Repository navigation
Browser harness: set the thread pool's arming timeout and report how many threads armed - #23
Merged
Merged
Conversation
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In a browser, a pool worker that has not reported ready within 1.5 s is dropped and the module runs on the rest. Under machine load a host that asked for 8 threads got 2, and nothing told it.
createWasiThreadSpawnalready takesprobeTimeoutMs;createBrowserModuleHarnessdid not forward it.What changes
wasiThreadProbeTimeoutMsand forwards it for the initial and the per-command thread contexts. The default stays 1.5 s. A value that is not a positive finite number is refused before any worker is created.wasiThreadPoolReporttaken from the pool's own ledger: the threads asked for (requested) and the threads that armed (armed). Arming fewer than asked does not throw; the host decides.src/index.d.ts;docs/isomorphic-pthreads.mddocuments the option and the report; a changelog line under 0.10.3. No version change.Tested in Chromium on the SDK's thread-wave module, on the direct and the command surface: with a 30 s timeout 4 of 4 threads arm; with a 1 ms timeout none arm, the report says so, every declined stripe runs on the calling thread and the output is identical to the one-thread output; no worker is alive after destroy; invalid values are refused. No assertion on timing. Firefox and WebKit were not run.
Not from this change, measured for the release
test/browser-reachable-node-builtins.test.jsfails at the released tag v0.10.2 exactly as on main: the root entry and./runtime-hostreachnode:crypto,node:fs,node:fs/promises,node:osandnode:paththrough the FlatSQL package entry.src/compiler/compileModule.jsandsrc/compiler/guestLinkLibraries.js; they fail the landing check here as on main.🤖 Generated with Claude Code
https://claude.ai/code/session_01PT7jJcdnhrPX14f8BuYuZy