/// import type { Option } from "../../Option"; import * as O from "../../Option"; import { AtomicReference } from "../../support"; import * as Ex from "../Exit"; import type { Exit } from "../Exit/model"; import type { FiberRef } from "../FiberRef"; import * as FR from "../FiberRef"; import * as Scope from "../Scope"; import type { Supervisor } from "../Supervisor"; import * as T from "./_internal/task"; import type { FiberId } from "./FiberId"; import type { InterruptStatus, RuntimeFiber } from "./model"; import type { Callback } from "./state"; import * as Status from "./status"; export declare type FiberRefLocals = Map, any>; export declare class InterruptExit { readonly apply: (a: any) => T.Task; readonly _tag = "InterruptExit"; constructor(apply: (a: any) => T.Task); } export declare class HandlerFrame { readonly apply: (a: any) => T.Task; readonly _tag = "HandlerFrame"; constructor(apply: (a: any) => T.Task); } export declare class ApplyFrame { readonly apply: (a: any) => T.Task; readonly _tag = "ApplyFrame"; constructor(apply: (a: any) => T.Task); } export declare type Frame = | InterruptExit | T.FoldInstruction | HandlerFrame | ApplyFrame; export declare class TracingContext { readonly running: Set>; readonly interval: AtomicReference; readonly trace: (fiber: Executor) => void; } export declare const _tracing: TracingContext; export declare const currentFiber: AtomicReference | null>; export declare const unsafeCurrentFiber: () => O.Option>; /** * `Executor` provides all of the context and facilities required to run a `Task` */ export declare class Executor implements RuntimeFiber { private readonly fiberId; private readonly initialEnv; private readonly initialInterruptStatus; private readonly fiberRefLocals; private readonly initialSupervisor; private readonly openScope; private readonly maxOperations; readonly _tag = "RuntimeFiber"; private readonly state; private readonly scheduler; private asyncEpoch; private continuationFrames?; private environments?; private interruptStatus?; private supervisors; private forkScopeOverride?; private scopeKey; constructor( fiberId: FiberId, initialEnv: any, initialInterruptStatus: InterruptStatus, fiberRefLocals: FiberRefLocals, initialSupervisor: Supervisor, openScope: Scope.Open>, maxOperations: number ); get poll(): T.IO>>; getRef(fiberRef: FR.FiberRef): T.IO; private _poll; private interruptExit; get isInterruptible(): boolean; get isInterrupted(): boolean; get isInterrupting(): boolean; get shouldInterrupt(): boolean; get isStackEmpty(): boolean; get id(): FiberId; private pushContinuation; private popContinuation; private pushEnv; private popEnv; private pushInterruptStatus; private popInterruptStatus; runAsync(k: Callback): void; /** * Unwinds the stack, looking for the first error handler, and exiting * interruptible / uninterruptible regions. */ private unwindStack; private registerObserver; private next; private notifyObservers; private observe; get await(): T.IO>; private interruptObserver; private kill; interruptAs(fiberId: FiberId): T.IO>; private done; private setInterrupting; private enterAsync; private exitAsync; private resumeAsync; evaluateLater(i0: T.Instruction): void; get scope(): Scope.Scope>; get status(): T.IO; private fork; private parentScopeOp; onDone(k: Callback>): void; private getDescriptor; private complete; get inheritRefs(): T.Task; private raceWithImpl; /** * Begins the `Task` run loop */ evaluateNow(start: T.Instruction): void; } //# sourceMappingURL=executor.d.ts.map