mirror of
https://github.com/denoland/deno.git
synced 2024-11-29 16:30:56 -05:00
330c820ae8
This commit removes "WorkerOptions.deno" option as a boolean, as well as "WorkerOptions.deno.namespace" settings. Starting with this commit all workers have access to "Deno" namespace by default.
13 lines
302 B
TypeScript
13 lines
302 B
TypeScript
import { deferred } from "../../../test_util/std/async/deferred.ts";
|
|
|
|
const worker = new Worker(
|
|
new URL("set_exit_code_worker.js", import.meta.url).href,
|
|
{ type: "module" },
|
|
);
|
|
|
|
const promise1 = deferred();
|
|
worker.onmessage = (_e) => {
|
|
promise1.resolve();
|
|
};
|
|
await promise1;
|
|
worker.terminate();
|