Utility trait for locks.

public abstract acquire(array $options = [])
Acquires a lock that will block until released.

  • return bool
  • throws RuntimeException If the lock fails to be acquired.
public abstract release()
Releases the lock.

  • throws RuntimeException
public synchronize(callable $func, array $options = [])
Execute a callable within a lock. If an exception is caught during execution of the callable the lock will first be released before throwing it.

  • return mixed
© 2020 Bruce Wells
Search Namespaces \ Classes
ConfigurationNumbers (0-9.) only