Method | Description | |
---|---|---|
__construct ( $name, integer $timeout = 3 ) | Sets the timeout. |
Method | Description | |
---|---|---|
acquire ( string $key, integer $expire ) : boolean | Tries to acquire a lock. | |
lock ( ) | ||
release ( string $key ) : boolean | Tries to release a lock. | |
unlock ( ) |
public __construct ( $name, integer $timeout = 3 ) | ||
$timeout | integer | The time in seconds a lock expires, default is 3. |