예제 #1
0
 /**
  * Broadcast to all Threads blocking on a call to Cond::wait().
  *
  * @param int $condition A handle to a Condition Variable returned by a previous call to Cond::create()
  *
  * @link http://www.php.net/manual/en/cond.broadcast.php
  * @return bool A boolean indication of success
  */
 public static function broadcast($condition)
 {
     if (fhread_cond_broadcast($condition) === 0) {
         return true;
     }
     return false;
 }
예제 #2
0
 /**
  * Notifiy the state cond for waiters to stop waiting
  * 
  * @return void
  */
 public function notify()
 {
     fhread_cond_broadcast($this->syncNotify);
     $this->setState(self::STATE_RUNNING);
 }