malkusch\lock\mutex\Mutex::synchronized PHP Метод

synchronized() абстрактный публичный Метод

This method implements Java's synchronized semantic. I.e. this method waits until a lock could be acquired, executes the code exclusively and releases the lock. The code block may throw an exception. In this case the lock will be released as well.
abstract public synchronized ( callable $code ) : mixed
$code callable The synchronized execution block.
Результат mixed The return value of the execution block.
    public abstract function synchronized(callable $code);