footprintjs - v11.2.0
    Preparing search index...

    Interface DetachHandle

    Handle returned by chart.detachAndJoinLater(...) and executor.detachAndJoinLater(...). Exposes status as PROPERTIES so sync access is property-read (cheap, no allocation). The single method wait() returns a Promise for opt-in async join.

    The handle is not Promise-shaped (no .then()) — that would make it accidentally awaitable, defeating the fire-and-forget semantics. To await, the consumer must call .wait() explicitly.

    Lifecycle:

    queued → driver received the work, hasn't started it running → driver started the work done → terminal: result available failed → terminal: error available

    done and failed are TERMINAL — once reached, status never changes again. A scheduling refusal can go straight from queued to failed, without starting the child.

    interface DetachHandle {
        error?: Error;
        id: string;
        result?: unknown;
        status: "done" | "failed" | "running" | "queued";
        wait(): Promise<DetachWaitResult>;
    }

    Implemented by

    Index
    error?: Error

    The work's error. Present iff status === 'failed'. Reading before terminal returns undefined.

    id: string

    Stable id assigned at detach time. The key of the in-flight registry (lookupDetachedHandle).

    result?: unknown

    The work's result. Present iff status === 'done'. Reading before terminal returns undefined.

    status: "done" | "failed" | "running" | "queued"

    Current state. Read directly for sync access.

    • Opt-in async join. Returns a Promise that:

      • resolves with { result } when status becomes 'done'
      • rejects with the captured Error when status becomes 'failed'
      • resolves/rejects IMMEDIATELY if status is already terminal
      • returns the SAME cached Promise on repeated calls (no re-running, no duplicated I/O)

      Calling wait() does NOT change the handle's lifecycle — it's passive observation. If never called, the work still completes; the handle just goes uncollected (parent execution unaffected).

      Use when:

      • You actually need the result and want to await it
      • Coordinating multiple handles via Promise.all / Promise.race
      • Backpressure ("don't fire more than N in flight")

      Don't use when:

      • Pure fire-and-forget (use detachAndForget — no handle returned)
      • You just want to check status (read handle.status directly)

      Returns Promise<DetachWaitResult>