import * as tsplus_module_1 from "@effect/core/io/Effect/operations/acquireReleaseExit";
/**
 * Constructs a scoped resource from an `acquire` and `release` workflow. If
 * `acquire` successfully completes execution then `release` will be added to
 * the finalizers associated with the scope of this workflow and is guaranteed
 * to be run when the scope is closed.
 *
 * The `acquire` and `release` workflows will be run uninterruptibly.
 *
 * @tsplus static ets/Effect/Ops acquireRelease
 * @tsplus fluent ets/Effect acquireRelease
 */

export function acquireRelease(acquire, release, __tsplusTrace) {
  return tsplus_module_1.acquireReleaseExit(acquire, (a, _) => release(a), __tsplusTrace);
}
//# sourceMappingURL=acquireRelease.mjs.map