ReviewOS

home-lang/home

Restore WebCrypto concurrent work-queue execution

#134
Closed chris opened this 10 days ago ·
10 days ago

Home still exports ConcurrentCppTask__createAndRun as a native no-op and the ported CppTask implementation uses placeholder WorkPool.schedule / VM event-loop reference types. As a result, every WebCrypto operation that takes the queued path is silently discarded and its promise remains pending forever (including HMAC sign/verify and SHA digests above the synchronous threshold).

This focused issue tracks replacing the no-op with the real force-linked export, wiring Home’s real thread pool and event-loop lifetime refs, and adding permanent regression coverage. It was discovered while porting the bun:jsc VM/serialization matrix in #133 and is part of #66.

10 days ago

Completed and pushed in 238c03b79ff77e9495afab5760365629971932aa (fix: restore concurrent C++ work queue).

The no-op ConcurrentCppTask__createAndRun export and placeholder scheduler/VM types are gone. Home now force-links the real export, schedules EventLoopTaskNoContext work on the real runtime pool, and holds/releases the originating VM event-loop reference around the job.

Verification:

  • queued crypto.subtle.sign("HMAC", ...): 32-byte SHA-256 signature, exit 0
  • queued 1 KiB crypto.subtle.digest("SHA-256", ...): 32-byte digest, exit 0
  • exact linked #133 corpus: 31 pass, 0 fail
  • ./pantry/.bin/zig build test -Dfilter=home_test --summary failures: pass

This repairs every C++ consumer of the concurrent work queue rather than special-casing WebCrypto.

Sign in to comment on this issue.