public static void SpinUntil(MyFunc<bool> condition) { ServerSpinWait sw = new ServerSpinWait (); while (!condition ()) sw.SpinOnce (); }