-
I need it to trigger first a state transition, and then process all the events in the event queue from the target state. |
Beta Was this translation helpful? Give feedback.
Answered by
nsk90
Jan 3, 2024
Replies: 1 comment 1 reply
-
Hi, no the library does not provide such an option. Here is QueuedPendingIntentHendler, maybe you can copy it's implementation and add the required method as a public member. Could you provide a code sample of your usecase? |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
xgirones
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, no the library does not provide such an option.
https://github.com/nsk90/kstatemachine/blob/897195f421a6fd797eda539fd3f3c4e27883038d/kstatemachine/src/commonMain/kotlin/ru/nsk/kstatemachine/PendingEventHandler.kt#L21
Here is QueuedPendingIntentHendler, maybe you can copy it's implementation and add the required method as a public member.
But I am not sure that it is good design.
Could you provide a code sample of your usecase?
Why you cannot just call processEvent in required order?