-
Notifications
You must be signed in to change notification settings - Fork 30k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src: set an appropriate thread pool size if given
--v8-pool-size=0
It doesn't terminate when any pending V8 tasks exist if no thread is in the pool. This allocates one thread at least for V8's background tasks if `--v8-pool-size=0` is given as a CLI option. Signed-off-by: Daeyeon Jeong <[email protected]> PR-URL: #45513 Fixes: #42523 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]>
- Loading branch information
Showing
3 changed files
with
24 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Flags: --v8-pool-size=0 --expose-gc | ||
|
||
'use strict'; | ||
|
||
require('../common'); | ||
|
||
// This verifies that V8 tasks scheduled by GC are handled on worker threads if | ||
// `--v8-pool-size=0` is given. The worker threads are managed by Node.js' | ||
// `v8::Platform` implementation. | ||
globalThis.gc(); |