Re: Sync IO APIs in Shared Workers

On Nov 23, 2013 2:04 PM, "David Bruant" <bruant.d@gmail.com> wrote:
>
> Le 22/11/2013 03:33, Jonas Sicking a écrit :
>>
>> We could enable sync IO APIs in workers while still allowing the
>> worker thread to remain responsive to messages from the main thread.
>> One solution is the API in [2]. Using that API the main thread can
>> send a error-response to a sync request for IO before the IO has
>> finished.
>>
>> [2]
http://lists.w3.org/Archives/Public/public-webapps/2013OctDec/0142.html
>
> I'm not sure I understand this proposal. If you allow messages from main
thread while waiting for I/O, aren't you re-introducing the same
complexities that sync APIs are expected to stay away from?

No, because the main thread can always "return early" and not wait for the
result from the IO before sending a message.

/ Jonas

Received on Sunday, 24 November 2013 01:24:27 UTC