📁 File Manager Pro
v10.0.3 | PHP: 8.1.34
Server: Apache
2026-06-21 23:00:52
📂
/ (Root)
/
opt
/
alt
/
ruby31
/
share
/
ri
/
system
/
Thread
/
ConditionVariable
📍 /opt/alt/ruby31/share/ri/system/Thread/ConditionVariable
🔄 Refresh
✏️
Editing: cdesc-ConditionVariable.ri
Read Only
U:RDoc::NormalClass[iI"ConditionVariable:ETI"Thread::ConditionVariable;TI"Object;To:RDoc::Markup::Document:@parts[o;;[ o:RDoc::Markup::Paragraph;[I"OConditionVariable objects augment class Mutex. Using condition variables, ;TI"Qit is possible to suspend while in the middle of a critical section until a ;TI" resource becomes available.;To:RDoc::Markup::BlankLine o; ;[I" Example:;T@o:RDoc::Markup::Verbatim;[I"mutex = Thread::Mutex.new ;TI".resource = Thread::ConditionVariable.new ;TI" ;TI"a = Thread.new { ;TI" mutex.synchronize { ;TI". # Thread 'a' now needs the resource ;TI" resource.wait(mutex) ;TI"* # 'a' can now have the resource ;TI" } ;TI"} ;TI" ;TI"b = Thread.new { ;TI" mutex.synchronize { ;TI"7 # Thread 'b' has finished using the resource ;TI" resource.signal ;TI" } ;TI"};T:@format0: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[ [ [ [[I" class;T[[:public[ [:protected[ [:private[[I"new;TI"thread_sync.c;T[I" instance;T[[;[ [;[ [;[[I"broadcast;T@:[I"signal;T@:[I" wait;T@:[ [U:RDoc::Context::Section[i 0o;;[ ; 0;0[I"thread_sync.c;TI"Thread;TcRDoc::NormalClass
💾 Save Changes
❌ Cancel