/* * call-seq: * Thread.critical= boolean => true or false * * Sets the status of the global ``thread critical'' condition and returns * it. When set to <code>true</code>, prohibits scheduling of any existing * thread. Does not block new threads from being created and run. Certain * thread operations (such as stopping or killing a thread, sleeping in the * current thread, and raising an exception) may cause a thread to be scheduled * even when in a critical section. <code>Thread::critical</code> is not * intended for daily use: it is primarily there to support folks writing * threading libraries. */ static VALUE rb_thread_critical_set(obj, val) VALUE obj, val; { rb_thread_critical = RTEST(val); return val; }