
Public Member Functions | |
| tryAcquiring ($timeout=0) | |
| Tries to acquires this mutex. | |
| release () | |
| Releases this mutex. | |
Static Public Member Functions | |
| static | get ($name) |
| Provides the mutex with given name. | |
Protected Attributes | |
| $file | |
| The file we're locking. | |
Static Protected Attributes | |
| static | $instances = array() |
| All instances of this class, indexed by their name. | |
Private Member Functions | |
| __construct ($name) | |
| Constructor. | |
Definition at line 7 of file Mutex.class.php.
| spunQ_Mutex::__construct | ( | $ | name | ) | [private] |
Constructor.
| $name | Name of the mutex to acquire. |
Definition at line 38 of file Mutex.class.php.
| static spunQ_Mutex::get | ( | $ | name | ) | [static] |
Provides the mutex with given name.
| $name | Name of the mutex to acquire. Multiple calls with the same name will return the same object. |
Definition at line 21 of file Mutex.class.php.
| spunQ_Mutex::release | ( | ) |
Releases this mutex.
Implements spunQ_IMutex.
Definition at line 53 of file Mutex.class.php.
| spunQ_Mutex::tryAcquiring | ( | $ | timeout = 0 |
) |
Tries to acquires this mutex.
| $timeout | Amount of seconds the function should block until the lock is acquired. Setting this to NULL will block indefinitely (until max_execution_time runs out). The default value of 0 will not block at all. |
Implements spunQ_IMutex.
Definition at line 46 of file Mutex.class.php.
spunQ_Mutex::$file [protected] |
spunQ_Mutex::$instances = array() [static, protected] |
All instances of this class, indexed by their name.
Definition at line 13 of file Mutex.class.php.
1.5.9