import * as tsplus_module_1 from "@effect/core/stm/THub/operations/THub/subscribe";
import * as tsplus_module_2 from "@effect/core/stm/STM/operations/commit";
import * as tsplus_module_3 from "@effect/core/stm/THub/operations/TDequeue/shutdown";
import * as tsplus_module_4 from "@effect/core/io/Effect/operations/acquireRelease";
/**
 * @tsplus fluent ets/THub subscribeScoped
 */

export function subscribeScoped_(self, __tsplusTrace) {
  return tsplus_module_4.acquireRelease(() => tsplus_module_2.commit(tsplus_module_1.subscribe(self), __tsplusTrace), _ => tsplus_module_2.commit(tsplus_module_3.shutdown(_), __tsplusTrace), __tsplusTrace);
}
/**
 * @tsplus static ets/THub/Aspects subscribeScoped
 */

export const subscribeScoped = __tsplusTrace => self => subscribeScoped_(self, __tsplusTrace);
//# sourceMappingURL=subscribeScoped.mjs.map