shajara API Map
    Preparing search index...

    Interface Executor

    Execution environment that launches entries and exposes external observation and control.

    interface Executor {
        cancel: (scope: ExecutionScopeRef<unknown>) => void;
        close: <Outcome>(
            endpoint: ChannelEndpoint<unknown, Outcome>,
            outcome: Outcome,
        ) => void;
        halt: (scope: ExecutionScopeRef<unknown>, failure: Failure) => void;
        launch: <Result>(
            scope: ExecutionScopeRef<unknown>,
            ritual: Ritual<Result>,
        ) => Option<LaunchHandle<Result>>;
        onSettled: <Result>(
            future: FutureKey<Result>,
            listener: (result: FutureResult<Result>) => void,
        ) => Disposer;
        scope: ExecutionScopeRef<never>;
        settle: <Result>(
            futureSettle: FutureSettleKey<Result>,
            result: FutureResult<Result>,
        ) => boolean;
        status: LaunchStatus;
        trySend: <Value, Outcome>(
            sender: ChannelSender<Value, Outcome>,
            value: Value,
        ) => Option<SendResult<Outcome>>;
    }

    Hierarchy (View Summary)

    Index
    cancel: (scope: ExecutionScopeRef<unknown>) => void

    Requests cancellation for a registered execution scope; unknown scopes are ignored.

    close: <Outcome>(
        endpoint: ChannelEndpoint<unknown, Outcome>,
        outcome: Outcome,
    ) => void

    Closes a channel through either endpoint and wakes blocked channel operations.

    halt: (scope: ExecutionScopeRef<unknown>, failure: Failure) => void

    Halts a registered open execution scope with an in-band failure. Unknown, closing, or closed scopes are ignored.

    launch: <Result>(
        scope: ExecutionScopeRef<unknown>,
        ritual: Ritual<Result>,
    ) => Option<LaunchHandle<Result>>

    Launches an entry as a child of a registered open execution scope.

    Type Declaration

    onSettled: <Result>(
        future: FutureKey<Result>,
        listener: (result: FutureResult<Result>) => void,
    ) => Disposer

    Subscribes to one future settlement.

    Type Declaration

      • <Result>(
            future: FutureKey<Result>,
            listener: (result: FutureResult<Result>) => void,
        ): Disposer
      • Type Parameters

        • Result

        Parameters

        • future: FutureKey<Result>
        • listener: (result: FutureResult<Result>) => void

          Called once with the settled in-band future result; already-settled futures notify synchronously.

        Returns Disposer

        Disposer that removes a pending listener before settlement.

    scope: ExecutionScopeRef<never>

    Scope that owns the launched work's exit future.

    settle: <Result>(
        futureSettle: FutureSettleKey<Result>,
        result: FutureResult<Result>,
    ) => boolean

    Attempts to settle a future through its settlement authority from outside computation code.

    Type Declaration

      • <Result>(
            futureSettle: FutureSettleKey<Result>,
            result: FutureResult<Result>,
        ): boolean
      • Type Parameters

        • Result

        Parameters

        Returns boolean

        true when the settlement is accepted, or false after prior convergence.

    status: LaunchStatus

    Current lifecycle state for the launched work.

    trySend: <Value, Outcome>(
        sender: ChannelSender<Value, Outcome>,
        value: Value,
    ) => Option<SendResult<Outcome>>

    Attempts one channel send through a sender endpoint without blocking the caller.

    Type Declaration

      • <Value, Outcome>(
            sender: ChannelSender<Value, Outcome>,
            value: Value,
        ): Option<SendResult<Outcome>>
      • Type Parameters

        • Value
        • Outcome

        Parameters

        Returns Option<SendResult<Outcome>>

        Immediate send result, or none when the send would block.