MCPcopy Create free account
hub / github.com/datner/react-effect / maybeSetResult

Method maybeSetResult

src/internal/fiberStore.ts:70–77  ·  view source on GitHub ↗
(result: Result.Result<E, A>)

Source from the content-addressed store, hash-verified

68
69 const interruptedRef = Ref.unsafeMake(false)
70 const maybeSetResult = (result: Result.Result<E, A>) =>
71 Effect.flatMap(
72 Ref.get(interruptedRef),
73 (interrupted) =>
74 interrupted
75 ? Effect.unit
76 : Effect.sync(() => this.setResult(result))
77 )
78
79 const fiber = pipe(
80 Stream.suspend(() => {

Callers

nothing calls this directly

Calls 1

setResultMethod · 0.95

Tested by

no test coverage detected