Linux heracles.o2switch.net 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
/
opt
/
alt
/
ruby21
/
share
/
ri
/
2.1.0
/
system
/
Mutex
/
//opt/alt/ruby21/share/ri/2.1.0/system/Mutex/cdesc-Mutex.ri
U:RDoc::NormalClass[iI" Mutex:ET@I"Object;To:RDoc::Markup::Document:@parts[o;;[ o:RDoc::Markup::Paragraph;[I"RMutex implements a simple semaphore that can be used to coordinate access to ;TI"2shared data from multiple concurrent threads.;To:RDoc::Markup::BlankLine o; ;[I" Example:;T@o:RDoc::Markup::Verbatim;[I"require 'thread' ;TI"semaphore = Mutex.new ;TI" ;TI"a = Thread.new { ;TI" semaphore.synchronize { ;TI"" # access shared resource ;TI" } ;TI"} ;TI" ;TI"b = Thread.new { ;TI" semaphore.synchronize { ;TI"" # access shared resource ;TI" } ;TI"};T:@format0: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[ [ [ [[I" class;T[[:public[[I"new;TI" thread.c;T[:protected[ [:private[ [I" instance;T[[;[[I" lock;T@1[I"locked?;T@1[I"owned?;T@1[I" sleep;T@1[I"synchronize;T@1[I" try_lock;T@1[I"unlock;T@1[;[ [;[ [ [U:RDoc::Context::Section[i 0o;;[ ; 0;0[@%@%cRDoc::TopLevel