import * as tsplus_module_1 from "@effect/core/io/Effect/operations/succeedNow";
import * as tsplus_module_2 from "@effect/core/io/Fiber/operations/interrupt";
import * as tsplus_module_3 from "@effect/core/io/Effect/operations/acquireRelease";
/**
 * Converts this fiber into a scoped effect. The fiber is interrupted when the
 * scope is closed.
 *
 * @tsplus fluent ets/Fiber scoped
 * @tsplus fluent ets/RuntimeFiber scoped
 */

export function scoped(self, __tsplusTrace) {
  return tsplus_module_3.acquireRelease(() => tsplus_module_1.succeedNow(self, __tsplusTrace), fiber => tsplus_module_2.interrupt(fiber, __tsplusTrace), __tsplusTrace);
}
//# sourceMappingURL=scoped.mjs.map