JezK
Edit File: cdesc-CachedThreadPool.ri
U:RDoc::NormalClass[iI"CachedThreadPool:EFI"!Concurrent::CachedThreadPool;FI"ThreadPoolExecutor;To:RDoc::Markup::Document:@parts[o;;[o:RDoc::Markup::Paragraph;[ I"SA thread pool that dynamically grows and shrinks to fit the current workload. ;TI"QNew threads are created as needed, existing threads are reused, and threads ;TI"Othat remain idle for too long are killed and removed from the pool. These ;TI"Qpools are particularly suited to applications that perform a high volume of ;TI"short-lived tasks.;To:RDoc::Markup::BlankLine o; ;[I"POn creation a `CachedThreadPool` has zero running threads. New threads are ;TI"Mcreated on the pool as new operations are `#post`. The size of the pool ;TI"Owill grow until `#max_length` threads are in the pool or until the number ;TI"Qof threads exceeds the number of running and pending operations. When a new ;TI"Roperation is post to the pool the first available idle thread will be tasked ;TI"with the new operation.;T@o; ;[ I"QShould a thread crash for any reason the thread will immediately be removed ;TI"Pfrom the pool. Similarly, threads which remain idle for an extended period ;TI"Lof time will be killed and reclaimed. Thus these thread pools are very ;TI".efficient at reclaiming unused resources.;T@o; ;[I"NThe API and behavior of this class are based on Java's `CachedThreadPool`;T@o; ;[I" @!macro thread_pool_options;T: @fileI"2lib/concurrent/executor/cached_thread_pool.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[ [ [ [[I" class;T[[:public[[I"new;TI"2lib/concurrent/executor/cached_thread_pool.rb;T[:protected[ [:private[ [I" instance;T[[; [ [;[ [;[[I"ns_initialize;F@6[ [U:RDoc::Context::Section[i 0o;;[ ;0;0[@*I"Concurrent;FcRDoc::NormalModule