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

Method addObserver

packages/effect/src/internal/fiberRuntime.ts:535–541  ·  view source on GitHub ↗

* Adds an observer to the list of observers. * * **NOTE**: This method must be invoked by the fiber itself.

(observer: (exit: Exit.Exit<A, E>) => void)

Source from the content-addressed store, hash-verified

533 * **NOTE**: This method must be invoked by the fiber itself.
534 */
535 addObserver(observer: (exit: Exit.Exit<A, E>) => void): void {
536 if (this._exitValue !== null) {
537 observer(this._exitValue!)
538 } else {
539 this._observers.push(observer)
540 }
541 }
542
543 /**
544 * Removes the specified observer from the list of observers that will be

Callers 1

unsafeMakeChildFiberFunction · 0.95

Calls 1

observerFunction · 0.85

Tested by

no test coverage detected