update : 2015.11.03
php.shukuma.com

검색:
 
 
Fires/sets the event

SyncEvent::fire

(PECL sync >= 1.0.0)

SyncEvent::fireFires/sets the event

설명

public bool SyncEvent::fire ( void )

Fires/sets a SyncEvent object. Lets multiple threads through that are waiting if the event object was created with a manual value of TRUE.

인수

이 함수는 인수가 없습니다.

반환값

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

예제

Example #1 SyncEvent::fire() example

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

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

참고