internal static void DoSleep() { RubyThreadInfo.RegisterThread(Thread.CurrentThread); // TODO: MRI throws an exception if you try to stop the main thread RubyThreadInfo info = RubyThreadInfo.FromThread(Thread.CurrentThread); info.Sleep(); }