public static IYield Wait(WaitEvent waitEvent) { if (waitEvent.IsSet()) { Run(Thread.Value); return None(); } waitEvent.AddWaitMicrothread(Thread.Value); return new WaitEventYield(); }