1
0
mirror of https://github.com/danog/amp.git synced 2024-12-11 17:09:40 +01:00

Fixed #90 - allow disabling of invalid watchers

This commit is contained in:
Bob Weinand 2016-08-25 22:48:21 +02:00
parent dff456ce83
commit b3fdfa4ede
2 changed files with 3 additions and 6 deletions

View File

@ -237,8 +237,6 @@ final class Loop
* @param string $watcherId The watcher identifier.
*
* @return void
*
* @throws InvalidWatcherException If the watcher identifier is invalid.
*/
public static function disable($watcherId)
{

View File

@ -134,19 +134,18 @@ abstract class Driver
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.