JezK
Edit File: cdesc-SynchronizedDelegator.ri
U:RDoc::NormalClass[iI"SynchronizedDelegator:EFI"&Concurrent::SynchronizedDelegator;FI"SimpleDelegator;To:RDoc::Markup::Document:@parts[o;;[ o:RDoc::Markup::Paragraph;[I"RThis class provides a trivial way to synchronize all calls to a given object ;TI"Pby wrapping it with a `Delegator` that performs `Monitor#enter/exit` calls ;TI"+around the delegated `#send`. Example:;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim;[I"0array = [] # not thread-safe on many impls ;TI"9array = SynchronizedDelegator.new([]) # thread-safe ;T:@format0o; ;[ I"RA simple `Monitor` provides a very coarse-grained way to synchronize a given ;TI"Qobject, in that it will cause synchronization for methods that have no need ;TI"Qfor it, but this is a trivial way to get thread-safety where none may exist ;TI"'currently on some implementations.;T@o; ;[I"MThis class is currently being considered for inclusion into stdlib, via ;TI"+https://bugs.ruby-lang.org/issues/8556;T@o; ;[I"@!visibility private;T: @fileI"9lib/concurrent/thread_safe/synchronized_delegator.rb;T:0@omit_headings_from_table_of_contents_below0; 0;0[ [ [ [[I" class;T[[:public[[I"new;TI"9lib/concurrent/thread_safe/synchronized_delegator.rb;T[:protected[ [:private[ [I" instance;T[[;[[I"method_missing;F@1[I" setup;F@1[I" teardown;F@1[;[ [;[ [ [U:RDoc::Context::Section[i 0o;;[ ; 0;0[@%I"Concurrent;FcRDoc::NormalModule