///
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