tkem/fsmlite

Add "queuing" FSM

Opened this issue · 3 comments

tkem commented

As stated in #5, process_event() must not be called recursively. Since this is a common pattern, especially with multiple FSMs passing events to each other, a "queuing" FSM type should be added.

tkem commented

Things to consider:

  • type of queue/container
  • priorities?
  • exception handling with pending events
tkem commented

Type of queue container should be an additional template argument. No default should be provided for compatibility with freestanding implementations.

tkem commented

Investigate whether this could be an additional processing_lock template parameter; then we'd have something like

  • no_lock for NDEBUG and -fno-exceptions
  • throwing_lock as default if exceptions are supported
  • queuing_lock to queue/postpone new events during event processing