class ScheduledTaskCanceled

Dispatched when coroutine cancellation stops a scheduled task after its starting notification, before or while its outcome is published.

Methods

__construct(Event $task, Throwable $cancellation, float|null $runtime = null, Throwable|null $exception = null)

Create a new event instance.

Details

at line 23
__construct(Event $task, Throwable $cancellation, float|null $runtime = null, Throwable|null $exception = null)

Create a new event instance.

Parameters

Event $task
Throwable $cancellation

the cancellation, or a failure carrying it, that stopped the task

float|null $runtime

the task's runtime, or null when cancellation stopped it before it finished running

Throwable|null $exception

the task's failure, when cancellation followed it