Multiple FSM machines running with threads