It's only possible to make async calls when a Web Worker sends messages to the
main thread or other Worker threads, ie postMessage
and addEventListener
.
Sometimes we want to use synchronous calls instead for various reasons.
It is possible to use SharedArrayBuffer
,
Atomics.wait
and Atomics.notify
to
achieve that.
Files: