mirror of
https://github.com/denoland/deno.git
synced 2025-02-20 12:22:52 -05:00

Classic worker scripts are now executed in the context of a Tokio runtime. This does mean we can not spawn more tokio runtimes in "op_worker_sync_fetch". We instead spawn a new thread there, that can create a new Tokio runtime that we can use to block the worker thread.
4 lines
131 B
JavaScript
4 lines
131 B
JavaScript
new Worker(
|
|
"data:application/javascript,setTimeout(() => {console.log('done'); self.close()}, 1000)",
|
|
{ type: "classic" },
|
|
);
|