Skip to content

Documentation / @hybrid-compute/worker / WorkerCancelMessageInterface

Interface: WorkerCancelMessageInterface ​

Defined in: packages/worker/src/types.ts:67

What the worker script receives when a task is cancelled or times out: the task's id and cancel: true. exposeTasks aborts the task's signal; a hand written worker script can ignore it.

Example ​

ts
const message: WorkerCancelMessageInterface = { id: 1, cancel: true };

Properties ​

cancel ​

ts
cancel: true;

Defined in: packages/worker/src/types.ts:69


id ​

ts
id: number;

Defined in: packages/worker/src/types.ts:68