import type { ExecutionStrategy } from "../ExecutionStrategy"; import * as Ex from "../Exit"; import type { Exit } from "../Exit/model"; import type { Executor } from "../Fiber/executor"; import type { Fiber } from "../Fiber/model"; import * as M from "../Managed/_core"; import { Managed } from "../Managed/model"; import * as RM from "../Managed/ReleaseMap"; import * as T from "./_internal/effect"; export declare function releaseAllReleaseMaps( exit: Exit, execStrategy: ExecutionStrategy ): (_: RM.ReleaseMap) => T.IO; /** * Applies the function `f` to each element of the `Iterable` and runs * produced effects in parallel, discarding the results. * * For a sequential version of this method, see `foreach_`. * * Optimized to avoid keeping full tree of effects, so that method could be * able to handle large input sequences. * Behaves almost like this code: * * Additionally, interrupts all effects on any failure. */ export declare function traverseIUnitPar_(as: Iterable, f: (a: A) => T.Task): T.Task; /** * Applies the function `f` to each element of the `Iterable` and runs * produced effects in parallel, discarding the results. * * For a sequential version of this method, see `foreach_`. * * Optimized to avoid keeping full tree of effects, so that method could be * able to handle large input sequences. * Behaves almost like this code: * * Additionally, interrupts all effects on any failure. */ export declare const traverseIUnitPar: ( f: (a: A) => T.Task ) => (as: Iterable) => T.Task; /** * Applies the function `f` to each element of the `Iterable` in parallel, * and returns the results in a new `readonly B[]`. * * For a sequential version of this method, see `foreach`. */ export declare const traverseIPar_: ( as: Iterable, f: (a: A) => T.Task ) => T.Task; export declare const traverseIPar: ( f: (a: A) => T.Task ) => (as: Iterable) => T.Task; /** * Applies the functionw `f` to each element of the `Iterable` in parallel, * and returns the results in a new `readonly B[]`. * * Unlike `foreachPar`, this method will use at most up to `n` fibers. */ export declare const traverseIParN_: ( n: number ) => (as: Iterable, f: (a: A) => T.Task) => T.Task; export declare const traverseIParN: ( n: number ) => (f: (a: A) => T.Task) => (as: Iterable) => T.Task; /** * Run a task while acquiring the resource before and releasing it after */ export declare const useManaged: ( f: (a: A) => T.Task ) => (self: M.Managed) => T.Task; /** * Run a task while acquiring the resource before and releasing it after */ export declare const useManaged_: ( self: M.Managed, f: (a: A) => T.Task ) => T.Task; /** * Creates a `Managed` value that acquires the original resource in a fiber, * and provides that fiber. The finalizer for this value will interrupt the fiber * and run the original finalizer. */ export declare const forkManaged: (self: M.Managed) => M.Managed>; /** * Construct a `ReleaseMap` wrapped in a `Managed`. The `ReleaseMap` will * be released with the specified `ExecutionStrategy` as the release action * for the resulting `Managed`. */ export declare const makeManagedReleaseMap: (es: ExecutionStrategy) => Managed; /** * Joins all fibers, awaiting their _successful_ completion. * Attempting to join a fiber that has erred will result in * a catchable error, _if_ that error does not result from interruption. */ export declare const joinAllFibers: (as: Iterable>) => T.Task; /** * Awaits on all fibers to be completed, successfully or not. */ export declare const awaitAllFibers: ( as: Iterable> ) => T.Task>; //# sourceMappingURL=index.d.ts.map