JezK
Edit File: exchange-i.ri
U:RDoc::AnyMethod[iI" exchange:EFI"+Concurrent::AbstractExchanger#exchange;FF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"2@!macro [attach] exchanger_method_do_exchange;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"KWaits for another thread to arrive at this exchange point (unless the ;TI"Lcurrent thread is interrupted), and then transfers the given object to ;TI"Iit, receiving its object in return. The timeout value indicates the ;TI"Iapproximate number of seconds the method should block while waiting ;TI"Gfor the exchange. When the timeout value is `nil` the method will ;TI"block indefinitely. ;TI" ;TI"E@param [Object] value the value to exchange with another thread ;TI"I@param [Numeric, nil] timeout in seconds, `nil` blocks indefinitely ;T:@format0o; ; [I"/@!macro [attach] exchanger_method_exchange;T@o;; [I"QIn some edge cases when a `timeout` is given a return value of `nil` may be ;TI"Pambiguous. Specifically, if `nil` is a valid value in the exchange it will ;TI"Mbe impossible to tell whether `nil` is the actual return value or if it ;TI"Msignifies timeout. When `nil` is a valid value in the exchange consider ;TI"4using {#exchange!} or {#try_exchange} instead. ;TI" ;TI"Q@return [Object] the value exchanged by the other thread or `nil` on timeout;T; 0: @fileI" lib/concurrent/exchanger.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(value, timeout = nil);T@&FI"AbstractExchanger;FcRDoc::NormalClass00