예제 #1
0
 /// <summary>
 /// Terminate the FSM.
 /// </summary>
 /// <param name="fsm">The FSM, which sould be terminated</param>
 // Terminate a specific fsm. this call is asynchronous. To wait on completion,
 // call the FSMs "Wait" method.
 public void TerminateFsm( Fsm fsm )
 {
     if (Thread.CurrentThread.GetHashCode() == thread.GetHashCode())
     {
         RemoveFsm(fsm);
     }
     else
     {
         TerminateFsmEvent ev = new TerminateFsmEvent();
         PushEvent( ev, fsm );
     }
 }
예제 #2
0
 /// <summary>
 /// Terminate all FSMs which are running on this processor.
 /// </summary>
 public void TerminateAllFsm()
 {
     if (Thread.CurrentThread.GetHashCode() == thread.GetHashCode())
     {
         RemoveAllFsms();
     }
     else
     {
         TerminateFsmEvent ev = new TerminateFsmEvent();
         PushEvent( ev, null );
     }
 }