Skip to content

Commit ef913fc

Browse files
authored
Merge pull request #112 from async-interop/consistent-docs
Make driver and loop docs consistent
2 parents aef839e + aa07fb1 commit ef913fc

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Loop.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ public static function setFactory(DriverFactory $factory = null)
5555
/**
5656
* Execute a callback within the scope of an event loop driver.
5757
*
58+
* The loop MUST continue to run until it is either stopped explicitly, no referenced watchers exist anymore, or an
59+
* exception is thrown that cannot be handled. Exceptions that cannot be handled are exceptions thrown from an
60+
* error handler or exceptions that would be passed to an error handler but none exists to handle them.
61+
*
5862
* @param callable $callback The callback to execute.
5963
* @param Driver $driver The event loop driver. If `null`, a new one is created from the set factory.
6064
*
@@ -118,6 +122,9 @@ public static function get()
118122
/**
119123
* Stop the event loop.
120124
*
125+
* When an event loop is stopped, it continues with its current tick and exits the loop afterwards. Multiple calls
126+
* to stop MUST be ignored and MUST NOT raise an exception.
127+
*
121128
* @return void
122129
*/
123130
public static function stop()

0 commit comments

Comments
 (0)