fix(ext/node): add basic node:worker_threads support (#19192)

This PR restores `node:worker_threads` implementation and test cases
from
[`std@0.175.0/node`](https://github.com/denoland/deno_std/blob/0.175.0/node/worker_threads.ts).

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
This commit is contained in:
Yoshiya Hinosawa 2023-05-24 03:56:29 +09:00 committed by GitHub
parent 3d865949c2
commit 26f42a248f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 324 additions and 84 deletions

View file

@ -46,6 +46,7 @@ function initialize(
// FIXME(bartlomieju): not nice to depend on `Deno` namespace here
// but it's the only way to get `args` and `version` and this point.
internals.__bootstrapNodeProcess(argv0, Deno.args, Deno.version);
internals.__initWorkerThreads();
// `Deno[Deno.internal].requireImpl` will be unreachable after this line.
delete internals.requireImpl;
}