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();
?>

참고

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top