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

Function interrupt

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

Source from the content-addressed store, hash-verified

92 })
93
94 const interrupt = (key: Key): Effect.Effect<void> =>
95 Effect.suspend(() => {
96 const entry = active.get(key)
97 if (entry?.owner === undefined) return Effect.void
98 entry.stopping = true
99 entry.pendingWake = false
100 return Fiber.interrupt(entry.owner)
101 })
102
103 return { active: Effect.sync(() => new Set(active.keys())), run, wake, interrupt }
104 })

Callers 1

RunFooterViewFunction · 0.50

Calls 2

interruptMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected