mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
47d3adb825
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 <daeyeon.dev@gmail.com> PR-URL: https://github.com/nodejs/node/pull/45513 Fixes: https://github.com/nodejs/node/issues/42523 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
11 lines
284 B
JavaScript
11 lines
284 B
JavaScript
// 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();
|