RFC-006 Phase 2: Migrate SenseWorkerPool to WorkerRuntime #292
Reference in New Issue
Block a user
Delete Branch "refactor/rfc-006-worker-runtime"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Migrates
SenseWorkerPoolfrom hand-rolledfork/IPC management to the newWorkerRuntimeabstraction (RFC-006).Changes
Production code
worker-runtime.ts: AddedtrySendSync(),hasDisconnectedChild(),forwardStderr,allowRespawn,onReady(key, msg)worker-pool.ts: Rewritten as thin wrapper aroundWorkerRuntime— from 195 lines of manual fork/IPC to ~106 lines of delegation. UsesevictingSet for async eviction visibility.Test fixes
connected: true(required bytrySendSync/isActive)flushSenseWorkerForkMicrotasks()helper to flush async fork schedulingworker-poolcrash test: removedshouldAdvanceTime: trueto avoid spurious extra forksTest results