No, workers cannot block. There have been suggestions for such APIs, for example from me ;) , but I don't think there is much interest in the standards bodies for such a thing. Perhaps it's for the best, I'm not sure.
See btw the Emterpreter for another way to simulate synchronous code https://github.com/kripken/emscripten/wiki/Emterpreter - Alon On Fri, Feb 13, 2015 at 12:01 AM, Marc Nieper-Wißkirchen < [email protected]> wrote: > In > > https://github.com/kripken/emscripten/wiki/Asyncify > > at the very end, it is mentioned that one way to handle code that needs to > be asynchronous on the Javascript side is to use blocking messages in > workers. > > This intrigues me: Can one block a web worker synchronously? > > -- > > Marc > > -- > You received this message because you are subscribed to the Google Groups > "emscripten-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
