const fileName_1 = "(@effect/core) _src/io/Supervisor/operations/fibersIn.ts";
import * as tsplus_module_1 from "@effect/core/io/Supervisor/definition";
import * as tsplus_module_2 from "@effect/core/io/Effect/operations/succeed";
import * as tsplus_module_3 from "@tsplus/stdlib/collections/SortedSet/add";
import * as tsplus_module_4 from "@tsplus/stdlib/collections/SortedSet/remove";
/**
 * Creates a new supervisor that tracks children in a set.
 *
 * @tsplus static ets/Supervisor/Ops fibersIn
 */

export function fibersIn(ref) {
  return tsplus_module_2.succeed(() => new tsplus_module_1.Supervisor(tsplus_module_2.succeed(() => ref.get, fileName_1 + ":11:21"), (_environment, _effect, _parent, fiber) => {
    const set = ref.get;
    ref.set(tsplus_module_3.add_(set, fiber));
  }, (_exit, fiber) => {
    const set = ref.get;
    ref.set(tsplus_module_4.remove_(set, fiber));
  }), fileName_1 + ":9:24");
}
//# sourceMappingURL=fibersIn.mjs.map