SemaphoreInterface
interface SemaphoreInterface
SemaphoreInterface defines an interface to manipulate the status of a semaphore.
Methods
bool
acquire()
Acquires the semaphore. If the semaphore has reached its limit.
void
refresh(float|null$ttlInSecond =null)
Increase the duration of an acquired semaphore.
bool
isAcquired()
Returns whether or not the semaphore is acquired.
void
release()
Release the semaphore.
bool
isExpired()
No description
float|null
getRemainingLifetime()
Returns the remaining lifetime.