W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2009

[whatwg] navigator.yield()? (Was: localStorage + worker processes)

From: Jonas Sicking <jonas@sicking.cc>
Date: Mon, 23 Mar 2009 17:17:43 -0700
Message-ID: <63df84f0903231717n63d0a896kde455b66c79cd660@mail.gmail.com>
On Mon, Mar 23, 2009 at 4:16 PM, Ian Hickson <ian at hixie.ch> wrote:
> On Mon, 23 Mar 2009, Jonas Sicking wrote:
>>
>> And that's not even touching on the stack space limitations that you're
>> quite likely to run in to when you have an API specifically for nesting.
>
> I think any sane implementation of this would have to be non-recursive.
> That's part of why I think it'd be so hard to implement.

Indeed, that'd be really hard to implement in the generic case. For
example a navigator.yield() inside an event handler, or inside a
callback.

We'd basically have to redesign all the code that implements the DOM
and all other APIs that are exposed to javascript.

Or rewrite our code in a language that supports continuations, which
C/C++ doesn't do. (no, setjmp and longjmp doesn't count :) ).

/ Jonas
Received on Monday, 23 March 2009 17:17:43 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:47:49 GMT