If I have certain actions, which are allowed in ce...
# random
u
If I have certain actions, which are allowed in certain state, where they dont change it state, however those actions are async, so need to change "some" state to pending, in order to avoid multiple calls until the async is finished i.e. I have call states, for example one of which is Activated, and I have actions like MuteMic, where this action is only allowed in Activated state but lets say MuteMic is heavy / or async, so I need to surround it with pending state, should that pending state be part of the call state hierarchy, i.e. on the same level as Activated is, or somehow nested inside it, or separate state machine?,
Copy code
when state == Activated
   when action == MuteMic
      state = ActivatedMuteMicPending
      effect(Effect.DoMuteMic)
      state = Activated
Copy code
sealed class State {
   object Activated,
   object ActivatedMuteMicPending
}
im not sure if this is good design
l
@ursus Don't you think this is a better fit for #C0922A726 or #C1H43FDRB, rather than #C09222272?
u
man, i didnt know it existed 😀 thx