SyncChannelWorker
Nodepod API / src / SyncChannelWorker
Class: SyncChannelWorker
Section titled “Class: SyncChannelWorker”Defined in: src/threading/sync-channel.ts:172
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new SyncChannelWorker(
buffer):SyncChannelWorker
Defined in: src/threading/sync-channel.ts:176
Parameters
Section titled “Parameters”buffer
Section titled “buffer”SharedArrayBuffer
Returns
Section titled “Returns”SyncChannelWorker
Methods
Section titled “Methods”allocateSlot()
Section titled “allocateSlot()”allocateSlot():
number
Defined in: src/threading/sync-channel.ts:182
Allocate a free slot; returns opaque handle (slot + generation). Never reuses in-flight slots.
Returns
Section titled “Returns”number
waitForResult()
Section titled “waitForResult()”waitForResult(
syncSlot,timeoutMs?,requestMore?):object
Defined in: src/threading/sync-channel.ts:206
Block until main writes the result. requestMore asks main for the next
chunk of a result bigger than one slot; without it, only what fits in
the first chunk is returned.
Parameters
Section titled “Parameters”syncSlot
Section titled “syncSlot”number
timeoutMs?
Section titled “timeoutMs?”number = 120_000
requestMore?
Section titled “requestMore?”() => void
Returns
Section titled “Returns”object
exitCode
Section titled “exitCode”exitCode:
number
stderr
Section titled “stderr”stderr:
string
stdout
Section titled “stdout”stdout:
string