MCPcopy
hub / github.com/Effect-TS/effect / clear

Function clear

packages/effect/src/FiberSet.ts:279–287  ·  view source on GitHub ↗
(self: FiberSet<A, E>)

Source from the content-addressed store, hash-verified

277 * @categories combinators
278 */
279export const clear = <A, E>(self: FiberSet<A, E>): Effect.Effect<void> =>
280 Effect.withFiberRuntime((clearFiber) => {
281 if (self.state._tag === "Closed") {
282 return Effect.void
283 }
284 return Effect.forEach(self.state.backing, (fiber) =>
285 // will be removed by the observer
286 Fiber.interruptAs(fiber, FiberId.combine(clearFiber.id(), internalFiberId)))
287 })
288
289const constInterruptedFiber = (function() {
290 let fiber: Fiber.RuntimeFiber<never, never> | undefined = undefined

Callers

nothing calls this directly

Calls 2

combineMethod · 0.65
idMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…