On Jun 6, 2011, at 9:51 AM, David Dahl wrote:
> On 6/6/11 at 11:00,[email protected] (Bill Frantz) wrote:
>> On 6/1/11 at 16:01, [email protected] (David Dahl) wrote:
>
>>> The property is namespaced in order to provide future capabilities. The
>>> current design is asynchronous and looks like this:
>
>> Is an asynchronous interface the best choice. I thought one of the great
>> reliability advantages of Javascript was its single-thread, synchronous
>> nature.
>
> Browsers almost by default will frown on including any synchronous APIs. With
> Firefox, we just don't want any additional main thread I/O happening.
To say more: JS is single-threaded, but that means you can lock up a "main
thread" and starve UI. Browsers use multiple threads and processes these days,
but the rule still applies. Scripts run to completion and must pass
continuations manually by callback functions if they need to run after some
indefinite delay, or even after a just-too-long computation or local i/o
operation.
/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss