During the event processing of the state machine, the warit of the waitgroup is called, which causes Fire to freeze.
Illustrate:
In the state machine, i need to use a timer, via time. NewTicker creates timers, timers. C to the end, call Fire to send a signal. When exiting the state, the timer is called to stop, and when the wait coroutine is stopped, the tracking finds that Fire is stuck.
I understand that calling Wait in state handling is not quite correct, and it is not allowed here in the first place. So are there any other recommended solutions to solve the problem?
During the event processing of the state machine, the warit of the waitgroup is called, which causes Fire to freeze. Illustrate: In the state machine, i need to use a timer, via time. NewTicker creates timers, timers. C to the end, call Fire to send a signal. When exiting the state, the timer is called to stop, and when the wait coroutine is stopped, the tracking finds that Fire is stuck.
I didn't find a similar problem, please help me.