MCPcopy Index your code
hub / github.com/Effect-TS/effect / Local

Class Local

packages/effect/src/internal/fiberScope.ts:43–60  ·  view source on GitHub ↗

@internal

Source from the content-addressed store, hash-verified

41
42/** @internal */
43class Local implements FiberScope {
44 readonly [FiberScopeTypeId]: FiberScopeTypeId = FiberScopeTypeId
45 constructor(
46 readonly fiberId: FiberId.FiberId,
47 readonly parent: FiberRuntime.FiberRuntime<any, any>
48 ) {
49 }
50 add(_runtimeFlags: RuntimeFlags.RuntimeFlags, child: FiberRuntime.FiberRuntime<any, any>): void {
51 this.parent.tell(
52 FiberMessage.stateful((parentFiber) => {
53 parentFiber.addChild(child)
54 child.addObserver(() => {
55 parentFiber.removeChild(child)
56 })
57 })
58 )
59 }
60}
61
62/** @internal */
63export const unsafeMake = (fiber: FiberRuntime.FiberRuntime<any, any>): FiberScope => {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…