Closed aedenj closed 11 months ago
Hi! thanks. The limitation is that only one thread may touch StateMachine at a moment. So if you have many threads that want to post events to some StateMachine, it should be synchronized externally. Or you can run StateMachine on worker thread and post events to that thread via queue from other ones.
You can run as many StateMachines on the single thread as you need, it is not limited. StateMachine does not block the thread (there is no infinite loop inside).
Sorry, if I understood your question wrong.
Closing?
Yes, thank for responding. Ultimately my issue was I was using object states and when I would create another machine I was misinterrupting the reason. In general is this the appropriate place for usage questions?
https://github.com/nsk90/kstatemachine/discussions Better place for questions here, I think.
First of all, great work. It's my understanding that there is a state chart per thread which is quite resource intensive for certain use cases. If i'm interested in tracking and measuring the result of events, think json payload, coming from possibly millions of IOT devices. The stream of events will contain events for numerous IOT devices each with their of state chart. I don't want to have millions of threads going. Is there any way around this start chart per thread limitation of this library?