Skip to content

Commit d29e175

Browse files
committed
Merge pull request #71 from async-interop/defer-delay-invalidation-note
Add the invalidation note on defer/delay
2 parents ae441eb + 7cd03f3 commit d29e175

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Loop/Driver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function stop();
3030
*
3131
* The deferred callable MUST be executed in the next tick of the event loop.
3232
*
33-
* @param callable(string $watcherId, mixed $data) $callback The callback to defer.
33+
* @param callable(string $watcherId, mixed $data) $callback The callback to defer. The $watcherId will be invalidated before the callback call.
3434
* @param mixed $data Arbitrary data given to the callback function as the $data parameter.
3535
*
3636
* @return string An identifier that can be used to cancel, enable or disable the watcher.
@@ -43,7 +43,7 @@ public function defer(callable $callback, $data = null);
4343
* The delay is a minimum and approximate, accuracy is not guaranteed.
4444
*
4545
* @param int $delay The amount of time, in milliseconds, to delay the execution for.
46-
* @param callable(string $watcherId, mixed $data) $callback The callback to delay.
46+
* @param callable(string $watcherId, mixed $data) $callback The callback to delay. The $watcherId will be invalidated before the callback call.
4747
* @param mixed $data Arbitrary data given to the callback function as the $data parameter.
4848
*
4949
* @return string An identifier that can be used to cancel, enable or disable the watcher.

0 commit comments

Comments
 (0)