Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9ab9e6a

Browse files
authored
Merge pull request #91 from async-interop/disabling_invalid_watcher
Allow disabling of invalid watchers
2 parents dff456c + b3fdfa4 commit 9ab9e6a

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/Loop.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,6 @@ public static function enable($watcherId)
237237
* @param string $watcherId The watcher identifier.
238238
*
239239
* @return void
240-
*
241-
* @throws InvalidWatcherException If the watcher identifier is invalid.
242240
*/
243241
public static function disable($watcherId)
244242
{

src/Loop/Driver.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,19 +134,18 @@ abstract public function onSignal($signo, callable $callback, $data = null);
134134
abstract public function enable($watcherId);
135135

136136
/**
137-
* Disable a watcher. Disabling a watcher MUST NOT invalidate the watcher.
137+
* Disable a watcher. Disabling a watcher MUST NOT invalidate the watcher. Calling this function MUST NOT fail,
138+
* even if passed an invalid watcher.
138139
*
139140
* @param string $watcherId The watcher identifier.
140141
*
141142
* @return void
142-
*
143-
* @throws InvalidWatcherException If the watcher identifier is invalid.
144143
*/
145144
abstract public function disable($watcherId);
146145

147146
/**
148147
* Cancel a watcher. This will detatch the event loop from all resources that are associated to the watcher. After
149-
* this operation the watcher is permanently invalid. Calling this function MUST never fail, even when passed an
148+
* this operation the watcher is permanently invalid. Calling this function MUST NOT fail, even if passed an
150149
* invalid watcher.
151150
*
152151
* @param string $watcherId The watcher identifier.

0 commit comments

Comments
 (0)