Mono.MicroThreads.Scheduler.Yield C# (CSharp) Method

Yield() public static method

public static Yield ( ) : void
return void
        public static void Yield()
        {
            s_scheduler.YieldInternal();
        }

Usage Example

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

#if EXTRA_CHECKS
            if (CurrentThread != this)
            {
                throw new Exception("Trying to yield a non-current thread");
            }
#endif
            Scheduler.Yield();
        }