1
0
mirror of https://github.com/danog/amp.git synced 2024-11-27 12:35:02 +01:00

Clarified that cancel() can be used to prevent a memory leak (#75)

This commit is contained in:
Andrew Carter 2016-06-06 21:37:17 +01:00 committed by Bob Weinand
parent 289b0fe603
commit ccb2180184
2 changed files with 5 additions and 2 deletions

View File

@ -241,7 +241,8 @@ final class Loop
}
/**
* Cancel a watcher. This marks the watcher identifier as invalid.
* 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.
*
* @param string $watcherId The watcher identifier.
*

View File

@ -128,7 +128,9 @@ interface Driver
public function disable($watcherId);
/**
* Cancel a watcher. This marks the watcher as invalid. Calling this function MUST never fail, even when passed an invalid watcher.
* 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 invalid
* watcher.
*
* @param string $watcherId The watcher identifier.
*