HEX
Server: Apache
System: Linux s198.coreserver.jp 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC 2025 x86_64
User: nagasaki (10062)
PHP: 7.1.33
Disabled: NONE
Upload Files
File: //usr/local/rvm/gems/ruby-2.5.9/doc/concurrent-ruby-1.1.9/ri/Concurrent/Delay/cdesc-Delay.ri
U:RDoc::NormalClass[iI"
Delay:ETI"Concurrent::Delay;TI"$Synchronization::LockableObject;To:RDoc::Markup::Document:@parts[o;;[o:RDoc::Markup::Paragraph;[
I"ILazy evaluation of a block yielding an immutable result. Useful for ;TI"Lexpensive operations that may never be needed. It may be non-blocking, ;TI"Psupports the `Concern::Obligation` interface, and accepts the injection of ;TI"Dcustom executor upon which to execute the block. Processing of ;TI"Eblock will be deferred until the first time `#value` is called. ;TI"FAt that time the caller can choose to return immediately and let ;TI"Dthe block execute asynchronously, block indefinitely, or block ;TI"with a timeout.;To:RDoc::Markup::BlankLineo;	;[I"LWhen a `Delay` is created its state is set to `pending`. The value and ;TI"Mreason are both `nil`. The first time the `#value` method is called the ;TI"Lenclosed opration will be run and the calling thread will block. Other ;TI"Pthreads attempting to call `#value` will block as well. Once the operation ;TI"Ois complete the *value* will be set to the result of the operation or the ;TI"O*reason* will be set to the raised exception, as appropriate. All threads ;TI"Tblocked on `#value` will return. Subsequent calls to `#value` will immediately ;TI"Sreturn the cached value. The operation will only be run once. This means that ;TI"Many side effects created by the operation will only happen once as well.;T@o;	;[I"Y`Delay` includes the `Concurrent::Concern::Dereferenceable` mixin to support thread ;TI"2safety of the reference returned by `#value`.;T@o;	;[I"@!macro copy_options;T@o;	;[I"*@!macro delay_note_regarding_blocking;To:RDoc::Markup::Verbatim;[I"I@note The default behavior of `Delay` is to block indefinitely when
;TI"L  calling either `value` or `wait`, executing the delayed operation on
;TI"E  the current thread. This makes the `timeout` value completely
;TI"G  irrelevant. To enable non-blocking behavior, use the `executor`
;TI"G  constructor option. This will cause the delayed operation to be
;TI"D  execute on the given executor, allowing the call to timeout.
;T:@format0o;	;[I".@see Concurrent::Concern::Dereferenceable;T:
@fileI",lib/concurrent-ruby/concurrent/delay.rb;T:0@omit_headings_from_table_of_contents_below0;
0;0[[[[I"Concern::Obligation;To;;[;
@9;0I",lib/concurrent-ruby/concurrent/delay.rb;T[[I"
class;T[[:public[[I"new;T@A[:protected[[:private[[I"
instance;T[[;[	[I"reconfigure;T@A[I"
value;T@A[I"value!;T@A[I"	wait;T@A[;[[I"ns_initialize;T@A[;[[[U:RDoc::Context::Section[i0o;;[;
0;0[@9I"Concurrent;TcRDoc::NormalModule