You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enable is when things get put back to the queue, hence that order shall be respected. Otherwise we get undefined behaviors when disabling deferreds which have yet to be executed and re-enabling them after the point they should have been executed.
Copy file name to clipboardExpand all lines: src/Loop/Driver.php
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ public function stop();
28
28
/**
29
29
* Defer the execution of a callback.
30
30
*
31
-
* The deferred callable MUST be executed in the next tick of the event loop and before any other type of watcher. Order of definition MUST be preserved when executing the callbacks.
31
+
* The deferred callable MUST be executed in the next tick of the event loop and before any other type of watcher. Order of enabling MUST be preserved when executing the callbacks.
32
32
*
33
33
* @param callable(string $watcherId, mixed $data) $callback The callback to defer. The $watcherId will be invalidated before the callback call.
34
34
* @param mixed $data Arbitrary data given to the callback function as the $data parameter.
@@ -40,7 +40,7 @@ public function defer(callable $callback, $data = null);
40
40
/**
41
41
* Delay the execution of a callback.
42
42
*
43
-
* The delay is a minimum and approximate, accuracy is not guaranteed. Order of calls MUST be determined by which timers expire first and secondarily the order of definition.
43
+
* The delay is a minimum and approximate, accuracy is not guaranteed. Order of calls MUST be determined by which timers expire first and secondarily the order of enabling.
44
44
*
45
45
* @param int $delay The amount of time, in milliseconds, to delay the execution for.
46
46
* @param callable(string $watcherId, mixed $data) $callback The callback to delay. The $watcherId will be invalidated before the callback call.
@@ -53,7 +53,7 @@ public function delay($delay, callable $callback, $data = null);
53
53
/**
54
54
* Repeatedly execute a callback.
55
55
*
56
-
* The interval between executions is a minimum and approximate, accuracy is not guaranteed. Order of calls MUST be determined by which timers expire first and secondarily the order of definition.
56
+
* The interval between executions is a minimum and approximate, accuracy is not guaranteed. Order of calls MUST be determined by which timers expire first and secondarily the order of enabling.
57
57
* The first execution is scheduled after the first interval period.
58
58
*
59
59
* @param int $interval The time interval, in milliseconds, to wait between executions.
@@ -67,7 +67,7 @@ public function repeat($interval, callable $callback, $data = null);
67
67
/**
68
68
* Execute a callback when a stream resource becomes readable.
69
69
*
70
-
* In case of multiple watchers on a same stream, order of definition MUST be preserved when executing the callbacks.
70
+
* In case of multiple watchers on a same stream, order of enabling MUST be preserved when executing the callbacks.
71
71
*
72
72
* @param resource $stream The stream to monitor.
73
73
* @param callable(string $watcherId, resource $stream, mixed $data) $callback The callback to execute.
@@ -80,7 +80,7 @@ public function onReadable($stream, callable $callback, $data = null);
80
80
/**
81
81
* Execute a callback when a stream resource becomes writable.
82
82
*
83
-
* In case of multiple watchers on a same stream, order of definition MUST be preserved when executing the callbacks.
83
+
* In case of multiple watchers on a same stream, order of enabling MUST be preserved when executing the callbacks.
84
84
*
85
85
* @param resource $stream The stream to monitor.
86
86
* @param callable(string $watcherId, resource $stream, mixed $data) $callback The callback to execute.
@@ -93,7 +93,7 @@ public function onWritable($stream, callable $callback, $data = null);
93
93
/**
94
94
* Execute a callback when a signal is received.
95
95
*
96
-
* In case of multiple watchers on a same signal, order of definition MUST be preserved when executing the callbacks.
96
+
* In case of multiple watchers on a same signal, order of enabling MUST be preserved when executing the callbacks.
97
97
*
98
98
* @param int $signo The signal number to monitor.
99
99
* @param callable(string $watcherId, int $signo, mixed $data) $callback The callback to execute.
0 commit comments