MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / killWorker

Function killWorker

docs/components/runtime.js:13–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11
12// Terminate the shared worker and reset state so the next run respawns cold.
13async function killWorker() {
14 const wp = workerPromise
15 workerPromise = null
16 workerReady = false
17 activeSink = null
18 try { (await wp)?.dispose() } catch {}
19}
20
21// `onPhase` only matters for the first (cold) call: 'runtime' (downloading the ESM) then 'worker' (spawn + wasm fetch/instantiate).
22function getWorker(onPhase) {

Callers 1

execFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected