I'm preparing a synchronous queue for the browsers. It's a queue that allows to send byte arrays between threads (workers) and it is based on SharedArrayBuffer and Atomics (subject to availability, currently works fine in Chrome, Firefox needs some reconfiguration). Early experiments show that it gives a 3-4x speedup comparing to using postMessage/onmessage. It also allows to synchronize some inherently asynchronous APIs, which is at times useful, especially when compiling C code to WebAssembly, as it often would have expectations of synchronous syscalls or other APIs.
There are still a few issues there I'd like to address before I publish it. Feel free to follow me on twitter (@yrashk) if you're interested, I'll announce it there.
There are still a few issues there I'd like to address before I publish it. Feel free to follow me on twitter (@yrashk) if you're interested, I'll announce it there.
I'm also considering making an experiment and publishing it under Prosperity license (https://licensezero.com/licenses/prosperity)