interface LockInterface

Lock interface.

Methods

bool
acquire(int|NULL $timeout = NULL)

Acquire lock.

bool|null|string
release()

No description

bool|null|string
isFree() deprecated

No description

bool
isAcquired()

No description

Details

at line 42
bool acquire(int|NULL $timeout = NULL)

Acquire lock.

Parameters

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

Return Value

bool

at line 48
bool|null|string release()

Return Value

bool|null|string Trueish/falsish.

at line 57
bool|null|string isFree() deprecated

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

Return Value

bool|null|string Trueish/falsish.

at line 62
bool isAcquired()

Return Value

bool