Interop\Async\Loop::cancel PHP 메소드

cancel() 공개 정적인 메소드

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 NOT fail, even if passed an invalid watcher.
public static cancel ( string $watcherId ) : void
$watcherId string The watcher identifier.
리턴 void
    public static function cancel($watcherId)
    {
        $driver = self::$driver ?: self::get();
        $driver->cancel($watcherId);
    }

Usage Example

예제 #1
0
파일: Pause.php 프로젝트: koolkode/async
 /**
  * {@inheritdoc}
  */
 public function cancel(\Throwable $e) : array
 {
     if ($this->state === self::PENDING) {
         Loop::cancel($this->watcher);
         $this->fail($e);
     }
     return [];
 }
All Usage Examples Of Interop\Async\Loop::cancel