MCPcopy Create free account
hub / github.com/anomalyco/opencode / awaitDone

Function awaitDone

packages/opencode/src/effect/runner.ts:64–65  ·  view source on GitHub ↗
(done: Deferred.Deferred<A, E | Cancelled>)

Source from the content-addressed store, hash-verified

62 : Deferred.done(done, exit).pipe(Effect.asVoid)
63
64 const awaitDone = (done: Deferred.Deferred<A, E | Cancelled>) =>
65 Deferred.await(done).pipe(Effect.catchTag("RunnerCancelled", (e) => onInterrupt ?? Effect.die(e)))
66
67 const idleIfCurrent = () =>
68 SynchronizedRef.modify(ref, (st) => [st._tag === "Idle" ? idle : Effect.void, st] as const).pipe(Effect.flatten)

Callers 1

ensureRunningFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected