What a pity! i was hoping to learn a way how to bliock workers - as it
would bring Emscripten in worker contexts much more to the synchronous C
model.

I agree that simply allowing blocking calls e.g. for receiving a new
message would raise problems - what if another event comes in at the same
time. But mutexes or locks could work.

Anyway, when ES6 proper tail calls come and asm,js learns to support them,
Emscripten could possibly rewrite everything in continuation passing style
so saving the continuation would pose no problem anymore.

--

Marc

2015-02-14 22:47 GMT+01:00 Alon Zakai <[email protected]>:

> 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 a topic in the
> Google Groups "emscripten-discuss" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/emscripten-discuss/iCVonEMlLPo/unsubscribe
> .
> To unsubscribe from this group and all its topics, 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.

Reply via email to