import * as tsplus_module_1 from "@effect/core/io/Effect/operations/addFinalizerExit";
import * as tsplus_module_2 from "@effect/core/io/Effect/operations/ensuring";
import * as tsplus_module_3 from "@effect/core/io/Effect/operations/suspendSucceed";
/**
 * A more powerful variant of `acquireReleaseInterruptible` that allows the
 * `release` effect to depend on the `Exit` value specified when the scope
 * is closed.
 *
 * @tsplus static ets/Effect/Ops acquireReleaseInterruptibleExit
 * @tsplus fluent ets/Effect acquireReleaseInterruptibleExit
 */

export function acquireReleaseInterruptibleExit(acquire, release, __tsplusTrace) {
  return tsplus_module_3.suspendSucceed(() => tsplus_module_2.ensuring_(acquire(), () => tsplus_module_1.addFinalizerExit(release, __tsplusTrace), __tsplusTrace), __tsplusTrace);
}
//# sourceMappingURL=acquireReleaseInterruptibleExit.mjs.map