import { FiberId } from "@effect/core/io/FiberId/definition"; import { RuntimeFlags } from "@effect/core/io/RuntimeFlags/definition"; import type { FiberRuntime } from "@effect/core/io/Fiber/_internal/runtime"; /** * A `FiberScope` represents the scope of a fiber lifetime. The scope of a * fiber can be retrieved using `Effect.descriptor`, and when forking fibers, * you can specify a custom scope to fork them on by using the `forkIn`. * * @tsplus type effect/core/io/FiberScope */ export type FiberScope = Global | Local; /** * @tsplus type effect/core/io/FiberScope.Ops */ export interface FiberScopeOps { } export declare const FiberScope: FiberScopeOps; export interface CommonScope { readonly fiberId: FiberId; readonly add: (runtimeFlags: RuntimeFlags, child: FiberRuntime) => void; } export declare class Global implements CommonScope { readonly fiberId: import("../FiberId").FiberId; add(runtimeFlags: RuntimeFlags, child: FiberRuntime): void; } export declare class Local implements CommonScope { readonly fiberId: FiberId; readonly parent: FiberRuntime; constructor(fiberId: FiberId, parent: FiberRuntime); add(_runtimeFlags: RuntimeFlags, child: FiberRuntime): void; } /** * The global scope. Anything forked onto the global scope is not supervised, * and will only terminate on its own accord (never from interruption of a * parent fiber, because there is no parent fiber). * @tsplus static effect/core/io/FiberScope.Ops global * @tsplus location "@effect/core/io/FiberScope/definition" */ export declare const globalScope: Global; /** * Unsafely creats a new `Scope` from a `Fiber`. * @tsplus static effect/core/io/FiberScope.Ops make * @tsplus location "@effect/core/io/FiberScope/definition" */ export declare function make(fiber: FiberRuntime): FiberScope; /** * @tsplus static effect/core/io/FiberScope.Ops _roots * @tsplus location "@effect/core/io/FiberScope/definition" */ export declare const _roots: Set>; //# sourceMappingURL=definition.d.ts.map