Nexus API Reference

DeferredCancellable
in package
implements Cancellable

FinalYes

Cancellable for timers scheduled before Co\run() starts.

The pending timer closure captures this instance and checks isCancelled() when run() executes pending actions. When cancel() is called first, the timer is never created. Once run() materialises the real timer, the pending closure attaches its handle here via materialize(), and cancel() delegates to it — cancelling after run() clears the live Swoole timer.

Table of Contents

Interfaces

Cancellable

Methods

cancel()  : void
isCancelled()  : bool
materialize()  : void
Attach the real timer handle created when run() replays the pending schedule, so later cancellation reaches the live Swoole timer.

Methods

materialize()

Attach the real timer handle created when run() replays the pending schedule, so later cancellation reaches the live Swoole timer.

public materialize(Cancellable $inner) : void
Parameters
$inner : Cancellable
On this page

Search results