(PECL sync >= 1.0.0)
SyncReaderWriter::writelock — 等待独占写锁
wait
等待锁的毫秒数。值为 -1 表示无限期等待。
示例 #1 SyncReaderWriter::writelock() 示例
<?php
$readwrite = new SyncReaderWriter("FileCacheLock");
$readwrite->writelock();
/* ... */
$readwrite->writeunlock();
?>