mirror of
https://github.com/danog/amp.git
synced 2024-12-03 09:57:51 +01:00
Fixed #90 - allow disabling of invalid watchers
This commit is contained in:
parent
dff456ce83
commit
b3fdfa4ede
@ -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)
|
||||
{
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user