// Stop sends a Release message to the state machine through the command chan.
Stop sends a Release message to the state machine through the command chan.
// Stop sends a Release message to the state machine through the command chan .
func (s *stateMachine) Stop() {
	select {
	case s.cmds <- ReleaseMessage():
		s.stop()
	case <-s.stopped:
	}
}
func ( s * stateMachine ) Stop ( ) { select { case s . cmds <- ReleaseMessage ( ) : s . stop ( ) case <- s . stopped : } }
Stop sends a Release message to the state machine through the command chan.
Stop sends a Release message to the state machine through the command chan .
// Also inform the state machine it should exit since the internal handler // may override the release message causing the task to be unreleaseable. // Already stopped!