Mono.MicroThreads.MicroThread.WakeUp C# (CSharp) Method

WakeUp() public method

public WakeUp ( ) : void
return void
        public void WakeUp()
        {
            if (m_state == MicroThreadState.Scheduled)
            {
                // thread has already been woken up
                return;
            }

            if (m_state != MicroThreadState.Waiting)
            {
                throw new Exception(String.Format("Illegal thread state in WakeUp(): {0}", m_state));
            }

            Scheduler.WakeUp(this);
        }

Usage Example

 public void Exit()
 {
     if (m_suspendedThreads.Count > 0)
     {
         MicroThread t = m_suspendedThreads.Dequeue();
         t.WakeUp();
     }
     m_locked = false;
 }
All Usage Examples Of Mono.MicroThreads.MicroThread::WakeUp