nupp.runtime.services.cancellation

Canonical task-cancellation identity within one Lua state.

create produces the cancellation value shared by suspension, structured tasks, and worker adapters. is recognizes its metatable identity without relying on message text. The operation and optional reason remain available as fields, and string conversion produces a contextual cancellation message.

This is an ordinary declaration/helper module, not a selectable service. Provider implementations import it to preserve cancellation recognition across subsystem boundaries. Worker states reconstruct cancellation values locally; no metatable or Lua object identity is transferred between states.

Module contents

Values

ValueKindDescription
createvariableCreates a cancellation value with the canonical state-local identity.
isvariableTests cancellation identity without parsing its diagnostic text.

Values#

createvariable#

const create

Creates a cancellation value with the canonical state-local identity.

isvariable#

const is

Tests cancellation identity without parsing its diagnostic text.