Is there some way to synchronously wait for or check for a new message in a web-worker?
I have a large complicated body of code (compiled LLVM from emscripten) that I c
A crude hack to do this could be to use a synchronous API, such as the FileSystem API, and use a temporary file as a synchronising mechanism.
In your example, the emscripten code could issue a synchronous read on a file, while the UI thread writes to the same file, effectively unblocking the worker.