mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
fix(ext/node): worker_threads handles basic require
calls (#30279)
Some checks are pending
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / build libs (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
Some checks are pending
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / build libs (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
This is not a full-fledged and fully correct `require`/CJS support for `node:worker_threads`, but unlocks certain scenarios that were not working at all previously.
This commit is contained in:
parent
43b376cd47
commit
dcdd1d6139
4 changed files with 54 additions and 7 deletions
|
@ -19,6 +19,7 @@ function initialize(args) {
|
|||
maybeWorkerMetadata,
|
||||
nodeDebug,
|
||||
warmup = false,
|
||||
moduleSpecifier = null,
|
||||
} = args;
|
||||
if (!warmup) {
|
||||
if (initialized) {
|
||||
|
@ -41,6 +42,7 @@ function initialize(args) {
|
|||
runningOnMainThread,
|
||||
workerId,
|
||||
maybeWorkerMetadata,
|
||||
moduleSpecifier,
|
||||
);
|
||||
internals.__setupChildProcessIpcChannel();
|
||||
// `Deno[Deno.internal].requireImpl` will be unreachable after this line.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue