1
0
mirror of https://github.com/danog/amp.git synced 2024-12-11 17:09:40 +01:00

Added reference() and unreference()

This commit is contained in:
Andrew Carter 2016-03-23 09:47:18 +00:00
parent 2b2b4678e7
commit 899e100349

View File

@ -112,4 +112,27 @@ interface EventLoopDriver
* @return void * @return void
*/ */
public function cancel(string $eventIdentifier); public function cancel(string $eventIdentifier);
/**
* Reference an event.
*
* This will keep the event loop alive whilst the event is still being monitored. Events have this state by default.
*
* @param string $eventIdentifier The event identifier.
*
* @return void
*/
public function reference(string $eventIdentifier);
/**
* Unreference an event.
*
* The event loop should exit the run method when only unreferenced events are still being monitored. Events are all
* referenced by default.
*
* @param string $eventIdentifier The event identifier.
*
* @return void
*/
public function unreference(string $eventIdentifier);
} }