SyncEvent::wait

(PECL sync >= 1.0.0)
Waits for the event to be fired/set
public bool SyncEvent::wait ([ integer $wait ] )

Waits for the SyncEvent object to be fired.

Parameters:
wait

The number of milliseconds to wait for the event to be fired. A value of -1 is infinite.

Returns:

A boolean of TRUE if the event was fired, FALSE otherwise.

Examples:
SyncEvent::wait() example
<?php
// In a web application:
$event = new SyncEvent("GetAppReport");
$event->fire();

// In a cron job:
$event = new SyncEvent("GetAppReport");
$event->wait();
?>

See also:

SyncEvent::fire() -

doc_php
2016-02-24 16:05:38
Comments
Leave a Comment

Please login to continue.