The work's error. Present iff status === 'failed'. Reading
before terminal returns undefined.
ReadonlyidStable id assigned at detach time. The key of the in-flight
registry (lookupDetachedHandle).
The work's result. Present iff status === 'done'. Reading
before terminal returns undefined.
Current state. Read directly for sync access.
Transition to terminal 'done' with the given result. No-op if already terminal (defensive: prevents driver bugs from corrupting state).
Transition to terminal 'failed' with the given error. No-op if already terminal.
Transition queued → running. No-op if already past 'queued'.
Public — opt-in async join. Returns a cached Promise.
See DetachHandle.wait() docstring for contract.
Internal handle implementation. Drivers call the
_mark*methods to drive state transitions; consumers see only the readonlyDetachHandleinterface.