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

Function run

packages/core/src/session/run-coordinator.ts:67–79  ·  view source on GitHub ↗
(key: Key)

Source from the content-addressed store, hash-verified

65 }
66
67 const run = (key: Key): Effect.Effect<void, E> =>
68 Effect.uninterruptibleMask((restore) => {
69 const entry = active.get(key)
70 if (entry !== undefined) {
71 if (entry.stopping) return restore(Deferred.await(entry.done).pipe(Effect.andThen(run(key))))
72 return restore(Deferred.await(entry.done))
73 }
74
75 const next = makeEntry()
76 active.set(key, next)
77 start(key, next, true)
78 return restore(Deferred.await(next.done))
79 })
80
81 const wake = (key: Key) =>
82 Effect.sync(() => {

Callers

nothing calls this directly

Calls 5

makeEntryFunction · 0.85
startFunction · 0.70
getMethod · 0.65
restoreFunction · 0.50
setMethod · 0.45

Tested by

no test coverage detected