MCPcopy Create free account
hub / github.com/Effect-TS/effect / run

Function run

packages/effect/src/unstable/workers/Worker.ts:76–82  ·  view source on GitHub ↗
(handler, options_)

Source from the content-addressed store, hash-verified

74}): Worker<any, any> => ({
75 send: options.send,
76 run(handler, options_) {
77 const onSpawn = options_?.onSpawn ?? Effect.void
78 return options.run((msg) => {
79 if (msg[0] === 0) return onSpawn
80 return handler(msg[1])
81 })
82 }
83})
84
85/**

Callers 1

emitFunction · 0.70

Calls 10

sendToPortFunction · 0.85
addFinalizerMethod · 0.80
joinMethod · 0.80
spawnFunction · 0.70
pipeMethod · 0.65
makeMethod · 0.65
handlerFunction · 0.50
runMethod · 0.45
syncMethod · 0.45
provideMethod · 0.45

Tested by

no test coverage detected