Method deprecated or moved
This method is deprecated or moved on the latest stable version.
The last existing version (v1_8_7_330) is shown here.
These similar methods exist in v2_5_5:
critical=(p1)
public
Sets the status of the global “thread
critical” condition and returns it. When set to true, 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. Thread::critical
is not intended for daily use: it is primarily there to support folks
writing threading libraries.
Show source
/*
* 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;
}