Skip to content

Commit

Permalink
Merge pull request #91 from async-interop/disabling_invalid_watcher
Browse files Browse the repository at this point in the history
Allow disabling of invalid watchers
  • Loading branch information
trowski authored Aug 30, 2016
2 parents dff456c + b3fdfa4 commit 9ab9e6a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 0 additions & 2 deletions src/Loop.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,6 @@ public static function enable($watcherId)
* @param string $watcherId The watcher identifier.
*
* @return void
*
* @throws InvalidWatcherException If the watcher identifier is invalid.
*/
public static function disable($watcherId)
{
Expand Down
7 changes: 3 additions & 4 deletions src/Loop/Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,19 +134,18 @@ abstract public function onSignal($signo, callable $callback, $data = null);
abstract public function enable($watcherId);

/**
* Disable a watcher. Disabling a watcher MUST NOT invalidate the watcher.
* Disable a watcher. Disabling a watcher MUST NOT invalidate the watcher. Calling this function MUST NOT fail,
* even if passed an invalid watcher.
*
* @param string $watcherId The watcher identifier.
*
* @return void
*
* @throws InvalidWatcherException If the watcher identifier is invalid.
*/
abstract public function disable($watcherId);

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

0 comments on commit 9ab9e6a

Please sign in to comment.