Regarding the const events: I am programming an MSM to proxy network traffic and once a message with data was received it'll be analysed and moved between different states. Message instances implement move semantics. Currently, the MSM has an initial state `ready` where the `message_in` event is handled. This event contains the message to be analysed. From my current understanding I either have to make message field in `message_in` event mutable or MSM needs to to support r-value references. Can somebody tell me what's going to happen if the action only accepts r-value reference to an event instance? Currently, it seems to work, but would like to understand the implications.
struct some_action_impl
{
template<class Fsm, class Event, class SourceState, class TargetState>
void operator()(Event&& ev, Fsm& fsm, SourceState& source, TargetState& target)
{ ... }
}
My last question relates to multi-threading. I understand that MSM manages internal states, would it be safe to create MSM as a thread-local storage and restart the thread-local MSM if the new request comes in? It's more about, what happens to MSM after an error state? Is calling stop(), start() members enough?
Many thanks for help,
Ovanes