Throw err into the spawned routine at its next yield point, and
abort its in-flight run I/O. err is delivered verbatim — the
routine's own try/catch may catch and recover (interrupt is
swallowable). When err is omitted, an InterruptedError is
thrown instead.
Interrupt only affects a still-running routine: interrupting one
that has already settled is a no-op. Under the default
onMainExit: "abandon", interrupting a child and then returning
from the main operation delivers nothing — the scheduler stops
before the child is driven. To run the child's catch/finally,
interrupt then yield* the task (interrupt-then-join).
Call from within the workflow (an advancing fiber), so the delivery point is deterministic across replay.
Optionalerr: unknown
A handle to a spawned routine: its
Future<T>plusinterrupt.