Skip to content
This repository has been archived by the owner on Sep 25, 2018. It is now read-only.

events stuck in internal queue when event at head is ignored #50

Open
mattoshry opened this issue Jan 26, 2018 · 1 comment
Open

events stuck in internal queue when event at head is ignored #50

mattoshry opened this issue Jan 26, 2018 · 1 comment

Comments

@mattoshry
Copy link
Collaborator

Per mainEventLoop described in [scxmlAlgo], macrostepDone remains false until both enabledTransitions.isEmpty and internalQueue.isEmpty.

The impl at [performBigStep] and [performBigStepAsync] only checks the former condition.

Repro:

<scxml version="1.0"
   xmlns="http://www.w3.org/2005/07/scxml">

<state id="uber">
  <state id="s1">
    <transition event="e2" target="pass"/>

    <onentry>
      <raise event="e1"/>
      <raise event="e2"/>
    </onentry>
  </state>
</state>

<final id="pass">
  <onentry>
    <log expr="'RESULT: pass'" label="TEST"/>
  </onentry>
</final>

</scxml>

[scxmlAlgo] https://www.w3.org/TR/scxml/#AlgorithmforSCXMLInterpretation
[performBigStep]: https://github.com/jbeard4/SCION-CORE/blob/master/lib/scion.js#L779
[performBigStepAsync]: https://github.com/jbeard4/SCION-CORE/blob/master/lib/scion.js#L809

@jbeard4
Copy link
Owner

jbeard4 commented Jun 23, 2018

@mattoshry Should be fixed in the latest release (4.3.1). Please try this again. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants