mirror of
https://github.com/denoland/deno.git
synced 2024-11-29 16:30:56 -05:00
a66218d457
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" },
|
|
);
|