class Concurrent::RubyThreadPoolExecutor
@!macro thread_pool_executor @!macro thread_pool_options @!visibility private
Constants
- DEFAULT_MAX_POOL_SIZE
@!macro thread_pool_executor_constant_default_max_pool_size
- DEFAULT_MAX_QUEUE_SIZE
@!macro thread_pool_executor_constant_default_max_queue_size
- DEFAULT_MIN_POOL_SIZE
@!macro thread_pool_executor_constant_default_min_pool_size
- DEFAULT_THREAD_IDLETIMEOUT
@!macro thread_pool_executor_constant_default_thread_timeout
Attributes
@!macro thread_pool_executor_attr_reader_idletime
@!macro thread_pool_executor_attr_reader_max_length
@!macro thread_pool_executor_attr_reader_max_queue
@!macro thread_pool_executor_attr_reader_min_length
Public Class Methods
@!macro thread_pool_executor_method_initialize
# File lib/concurrent/executor/ruby_thread_pool_executor.rb, line 39 def initialize(opts = {}) super(opts) end
Public Instance Methods
@!macro executor_service_method_can_overflow_question
# File lib/concurrent/executor/ruby_thread_pool_executor.rb, line 59 def can_overflow? synchronize { ns_limited_queue? } end
@!macro thread_pool_executor_attr_reader_completed_task_count
# File lib/concurrent/executor/ruby_thread_pool_executor.rb, line 54 def completed_task_count synchronize { @completed_task_count } end
@!macro thread_pool_executor_attr_reader_largest_length
# File lib/concurrent/executor/ruby_thread_pool_executor.rb, line 44 def largest_length synchronize { @largest_length } end
@!macro thread_pool_executor_attr_reader_length
# File lib/concurrent/executor/ruby_thread_pool_executor.rb, line 64 def length synchronize { @pool.length } end
@!macro thread_pool_executor_attr_reader_queue_length
# File lib/concurrent/executor/ruby_thread_pool_executor.rb, line 69 def queue_length synchronize { @queue.length } end
@!visibility private
# File lib/concurrent/executor/ruby_thread_pool_executor.rb, line 90 def ready_worker(worker) synchronize { ns_ready_worker worker } end
@!macro thread_pool_executor_attr_reader_remaining_capacity
# File lib/concurrent/executor/ruby_thread_pool_executor.rb, line 74 def remaining_capacity synchronize do if ns_limited_queue? @max_queue - @queue.length else -1 end end end
@!visibility private
# File lib/concurrent/executor/ruby_thread_pool_executor.rb, line 85 def remove_busy_worker(worker) synchronize { ns_remove_busy_worker worker } end
@!macro thread_pool_executor_attr_reader_scheduled_task_count
# File lib/concurrent/executor/ruby_thread_pool_executor.rb, line 49 def scheduled_task_count synchronize { @scheduled_task_count } end
@!visibility private
# File lib/concurrent/executor/ruby_thread_pool_executor.rb, line 100 def worker_died(worker) synchronize { ns_worker_died worker } end
@!visibility private
# File lib/concurrent/executor/ruby_thread_pool_executor.rb, line 95 def worker_not_old_enough(worker) synchronize { ns_worker_not_old_enough worker } end
@!visibility private
# File lib/concurrent/executor/ruby_thread_pool_executor.rb, line 105 def worker_task_completed synchronize { @completed_task_count += 1 } end