0.1.0
What's New
Initial release.
Utopia\Lock\Lockinterface withacquire,tryAcquire,release,withLock.Utopia\Lock\Lock\Mutex— Swoole coroutine mutex backed bySwoole\Coroutine\Channel(1).Utopia\Lock\Lock\Semaphore— Swoole coroutine semaphore with a configurable permit count.Utopia\Lock\Lock\File—flock()based file lock (LOCK_EXorLOCK_SH), cooperates with Swoole's runtime hooks.Utopia\Lock\Lock\Distributed— RedisSET NX EXlock with Lua-atomic release and refresh, fractional-second timeouts, optional logger.Utopia\Lock\Exceptionbase exception andUtopia\Lock\Exception\Contentionthrown whenwithLocktimes out.