Class: BundleUpdateInteractive::ThreadPool
- Inherits:
-
Object
- Object
- BundleUpdateInteractive::ThreadPool
- Includes:
- Concurrent::Promises::FactoryMethods
- Defined in:
- lib/bundle_update_interactive/thread_pool.rb
Instance Method Summary collapse
- #default_executor ⇒ Object
-
#initialize(max_threads:) ⇒ ThreadPool
constructor
A new instance of ThreadPool.
Constructor Details
#initialize(max_threads:) ⇒ ThreadPool
Returns a new instance of ThreadPool.
9 10 11 12 13 14 15 |
# File 'lib/bundle_update_interactive/thread_pool.rb', line 9 def initialize(max_threads:) @executor = Concurrent::ThreadPoolExecutor.new( min_threads: 0, max_threads: max_threads, max_queue: 0 ) end |
Instance Method Details
#default_executor ⇒ Object
17 18 19 |
# File 'lib/bundle_update_interactive/thread_pool.rb', line 17 def default_executor @executor end |