Documentation

LockInterface

Lock interface.

Table of Contents

Methods

acquire()  : bool
Acquire lock.
isAcquired()  : bool
isFree()  : bool|null|string
release()  : bool|null|string

Methods

acquire()

Acquire lock.

public acquire([int|null $timeout = NULL ]) : bool
Parameters
$timeout : int|null = NULL

The number of seconds to wait to get the lock. For a default value, use NULL.

Return values
bool

isFree()

public isFree() : bool|null|string

Not supported by some locking strategies. If you need to poll, better to use acquire(0).

Return values
bool|null|string

Trueish/falsish.

release()

public release() : bool|null|string
Return values
bool|null|string

Trueish/falsish.


        
On this page

Search results