The point being that you can create an asynchronous *style* in your events
that you add, but the Events functionality itself can't do anything about
it.

On Tue, Dec 7, 2010 at 6:48 PM, אריה גלזר <[email protected]> wrote:

>
>
> On Wed, Dec 8, 2010 at 1:21 AM, Aaron Newton <[email protected]> wrote:
>
>> JavaScript is a single-threaded environment. There's no such thing
>> as asynchronous invokation. If there are *N *functions on a stack that
>> need executing, they'll all be executed one at a time. Even if you set a
>> timeout on each one of 0ms, as soon as that function is invoked nothing else
>> is going on.
>>
>
> At first I thought there was an exception to this but after a some testing
> on setTimeout I see I was wrong at this...
> I have used setTimeout before to create fake threaded functions, and in all
> my tests I have witnessed improved perceived performance - for example doing
> element iterations while also going on with other operations. I suppose it
> has to do with the way the engines implement setTimeout...
>
> bummer then. `Twas a cool idea though...
> --
> Arieh Glazer
> אריה גלזר
> 052-5348-561
> http://www.arieh.co.il
> http://www.link-wd.co.il
>
>

Reply via email to