import * as tsplus_module_1 from "@effect/core/stm/STM/operations/unit";
import * as tsplus_module_2 from "@effect/core/stm/STM/operations/retry";
import * as tsplus_module_3 from "@effect/core/stm/THub/operations/THub/isShutdown";
import * as tsplus_module_4 from "@effect/core/stm/STM/operations/flatMap";
/**
 * @tsplus getter ets/THub awaitShutdown
 */

export function awaitShutdown(self) {
  return tsplus_module_4.flatMap_(tsplus_module_3.isShutdown(self), isShutdown => isShutdown ? tsplus_module_1.unit_ : tsplus_module_2.retry);
}
//# sourceMappingURL=awaitShutdown.mjs.map