W3C home > Mailing lists > Public > www-voice@w3.org > January to March 2013

Re: revised mainEventLoop

From: chris nuernberger <cnuernber@gmail.com>
Date: Fri, 8 Mar 2013 12:34:01 -0700
Message-ID: <CAG=GWvff45vX4amLxGfd1zv54GOTRMNqLea6sc=T4k+HhR=ThQ@mail.gmail.com>
To: David Junger <tffy@free.fr>
Cc: "www-voice@w3.org (www-voice@w3.org)" <www-voice@w3.org>
I agree :).


On Fri, Mar 8, 2013 at 11:47 AM, David Junger <tffy@free.fr> wrote:

> Le 8 mar 2013 à 18:57, chris nuernberger a écrit :
> > I see what you are saying and you are correct as far as I can tell, this
> is more efficient.  Don't you need a second while loop for external events
> that gets called if enabled transitions is empty?
> Yes, I was just proposing a modification to the inner loop that handles
> targetless transitions and internal events and didn't write the context.
> > Although depending on your state machine your conditions could check for
> time differences or some other externally updating information source.
>  This would mean you would want to poll the eventless transitions again.
> Yes, it is possible to raise a hundred thousand useless events and look at
> the time in a eventless transition's condition, but seriously? for
> benchmarking that would be irrelevant, and for anything else it is silly.
> If you need ticks you can instead have a "clock" state generating events at
> regular intervals with delayed sends and some offset correction, or, for
> more precision, extend the platform to provide those events.
> Internal events should dequeue so fast that you shouldn't expect (and the
> platform should not push, to prevent race conditions) external
> modifications to the datamodel during that time. Besides, if your SC is
> polling external data (rather than listening for mutation events!) with an
> eventless transition whose repetition depends on stuffing the internal
> queue with junk events, you deserve to have your code broken in a horrible
> way :p
>                         David

A foolish consistency is the hobgoblin of little minds - Emerson
Received on Friday, 8 March 2013 19:34:33 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:07:43 UTC