Swoole\Coroutine\Lock::lock
(No version information available, might only be in Git)
Swoole\Coroutine\Lock::lock — Acquire the lock, blocking if necessary
Description
When executing the lock operation, if the lock is already held by another coroutine, the current coroutine will actively yield CPU control and enter a suspended state. When the coroutine holding the lock calls unlock(), the waiting coroutine will be awakened and try to acquire the lock again.
Parameters
This function has no parameters.
来源:PHP Documentation Group · 作者与贡献记录 · CC BY 3.0。离线整理了版式、链接和媒体显示。
