[Sorry for the delay. I'm at Reed Collage and the internet
service I've glommed onto doesn't let me contact my SMTP server,
so I can't send email, only receive it.]
On 6/6/11 at 13:00, bren...@mozilla.com (Brendan Eich) wrote:
On Jun 6, 2011, at 9:51 AM, David Dahl wrote:
On 6/6/11 at 11:00,fra...@pwpconsult.com (Bill Frantz) wrote:
On 6/1/11 at 16:01, dd...@mozilla.com (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.
Thanks Brendan. That explanation answers my question and,
assuming the continuations can't run at the same time as the
"main" program, satisfies my implied objection.
Cheers - Bill
-----------------------------------------------------------------------
Bill Frantz | OAuth - It's the best that | Periwinkle
(408)356-8506 | the wrong way of doing things| 16345
Englewood Ave
www.pwpconsult.com | can provide. - Mike Stay | Los Gatos,
CA 95032
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss