Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
90227bd3
Commit
90227bd3
authored
Jun 25, 2013
by
resurtm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Autorelease callback improved, composer.json typo.
parent
397004c8
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
+9
-5
composer.json
extensions/mutex/composer.json
+1
-1
Mutex.php
extensions/mutex/yii/mutex/Mutex.php
+8
-4
Mutex.php
extensions/mutex/yii/mutex/cache/Mutex.php
+0
-0
No files found.
extensions/mutex/composer.json
View file @
90227bd3
...
...
@@ -22,6 +22,6 @@
"yiisoft/yii2"
:
"*"
},
"autoload"
:
{
"psr-0"
:
{
"yii
\\
smarty
"
:
""
}
"psr-0"
:
{
"yii
\\
mutex
"
:
""
}
}
}
extensions/mutex/yii/mutex/Mutex.php
View file @
90227bd3
...
...
@@ -33,7 +33,13 @@ abstract class Mutex extends Component
public
function
init
()
{
if
(
$this
->
autoRelease
)
{
register_shutdown_function
(
array
(
$this
,
'shutdownFunction'
));
$referenceHolder
=
new
stdClass
();
$referenceHolder
->
locks
=
&
$this
->
_locks
;
register_shutdown_function
(
function
(
$ref
)
{
foreach
(
$ref
->
locks
as
$lock
)
{
$this
->
release
(
$lock
);
}
},
$referenceHolder
);
}
}
...
...
@@ -42,9 +48,7 @@ abstract class Mutex extends Component
*/
public
function
shutdownFunction
()
{
foreach
(
$this
->
_locks
as
$lock
)
{
$this
->
release
(
$lock
);
}
}
/**
...
...
extensions/mutex/yii/mutex/cache/Mutex.php
View file @
90227bd3
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment