Re: revised mainEventLoop

Le 21 feb 2013 à 16:27, Jim Barnett a écrit :

>         # Here we handle eventless transitions and transitions
>         # triggered by internal events until macrostep is complete
>         while running and not macrostepDone:
>             enabledTransitions = selectEventlessTransitions()
>             if enabledTransitions.isEmpty():
>                 if internalQueue.isEmpty():
>                     macrostepDone = true
>                 else:
>                     internalEvent = internalQueue.dequeue()
>                     datamodel["_event"] = internalEvent
>                     enabledTransitions = selectTransitions(internalEvent)
>             if not enabledTransitions.isEmpty():
>                 microstep(enabledTransitions.toList())

If I read it right, it means that eventless transitions are tested every time we dequeue an internal event. The only reason to do that would be if you had eventless transitions testing the contents of _event, which would be kind of hypocritical for "eventless" transitions. If that's not intented (and the fact that external events don't do that suggests it is not), then we should test eventless transitions just once, and then ignore those while consuming internal events.

			David

Received on Friday, 8 March 2013 10:13:07 UTC