mirror of
https://github.com/denoland/deno.git
synced 2024-12-15 03:48:02 -05:00
10 lines
185 B
JavaScript
10 lines
185 B
JavaScript
|
console.log("hello from worker");
|
||
|
|
||
|
self.onmessage = (e) => {
|
||
|
if (e.data != "hello") {
|
||
|
throw new Error("wrong message");
|
||
|
}
|
||
|
|
||
|
self.postMessage({ pid: process.pid });
|
||
|
}
|