- Symphony 2.2.1
-
› boot
9 -
› core
22 -
› email-gateways
3 -
› toolkit
66 -
› Unknown
33 - Delegates83
- Deprecated30
Versions
- 2.7.9
- 2.7.8
- 2.7.7
- 2.7.6
- 2.7.5
- 2.7.3
- 2.7.2
- 2.7.10
- 2.7.1
- 2.7.0
- 2.6.9
- 2.6.8
- 2.6.7
- 2.6.6
- 2.6.5
- 2.6.4
- 2.6.3
- 2.6.2
- 2.6.11
- 2.6.10
- 2.6.1
- 2.6.0
- 2.5.3
- 2.5.2
- 2.5.1
- 2.5.0
- 2.4
- 2.3.6
- 2.3.5
- 2.3.4
- 2.3.3
- 2.3.2
- 2.3.1
- 2.3
- 2.2.5
- 2.2.4
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2
Options
public class Mutex
class.mutex.php #10The Mutex class is a crude locking class that generates files with a specific time to live. It has basic functions to create a lock, release a lock or refresh a lock.
Methods
static boolean acquire(
$id, $ttl, $path)
Creates a lock file if one does not already exist with a certain time to live (TTL) at a specific path. If a lock already exists, false will be returned otherwise boolean depending if a lock file was created successfully or not.
Parameters
static boolean lockExists(
$id, $path)
Checks if a lock exists, purely on the presence on the lock file. This function takes the unobfuscated lock name
Parameters
static boolean refresh(
$id, $ttl, $path)
Updates a lock file to 'keep alive' for another 'x' seconds.
Parameters
static boolean release(
$id, $path)
Removes a lock file. This is the only way a lock file can be removed