// ets_tracing: off import { fromEffect } from "../Managed/fromEffect.js" import { makeExit_ } from "../Managed/makeExit.js" import type { Managed } from "../Managed/managed.js" import type { Effect } from "./effect.js" /** * Converts this Effect to a Managed. This Effect and the provided release action * will be performed uninterruptibly. */ export function toManaged(self: Effect): Managed { return fromEffect(self) } /** * Converts this Effect to a Managed. This Effect and the provided release action * will be performed uninterruptibly. */ export function toManagedRelease_( self: Effect, release: (a: A) => Effect ): Managed { return makeExit_(self, release) } /** * Converts this Effect to a Managed. This Effect and the provided release action * will be performed uninterruptibly. * * @ets_data_first toManagedRelease_ */ export function toManagedRelease( release: (a: A) => Effect ): (self: Effect) => Managed { return (self) => makeExit_(self, release) }