(PECL sync >= 1.0.0)
SyncSemaphore::unlock — 增加信号量的计数
prevcount
返回信号量的先前计数。
示例 #1 SyncSemaphore::unlock() 示例
<?php
$semaphore = new SyncSemaphore("LimitedResource_2clients", 2);
if (!$semaphore->lock(3000))
{
echo "Unable to lock semaphore.";
exit();
}
/* ... */
$semaphore->unlock();
?>