Skip to content

SyncChannelWorker

Nodepod API


Nodepod API / src / SyncChannelWorker

Defined in: src/threading/sync-channel.ts:172

new SyncChannelWorker(buffer): SyncChannelWorker

Defined in: src/threading/sync-channel.ts:176

SharedArrayBuffer

SyncChannelWorker

allocateSlot(): number

Defined in: src/threading/sync-channel.ts:182

Allocate a free slot; returns opaque handle (slot + generation). Never reuses in-flight slots.

number


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.

number

number = 120_000

() => void

object

exitCode: number

stderr: string

stdout: string