array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'swoole-lock.lock.php', 1 => 'Swoole\\Lock::lock', 2 => 'Try to acquire the lock. It will block if the lock is not available.', ), 'up' => array ( 0 => 'class.swoole-lock.php', 1 => 'Swoole\\Lock', ), 'prev' => array ( 0 => 'swoole-lock.destruct.php', 1 => 'Swoole\\Lock::__destruct', ), 'next' => array ( 0 => 'swoole-lock.lock-read.php', 1 => 'Swoole\\Lock::lock_read', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/swoole/swoole/lock/lock.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>
(PECL swoole >= 1.9.0)
Swoole\Lock::lock — Try to acquire the lock. It will block if the lock is not available.
此函数没有参数。