Module: Ambo::Task

Defined in:
lib/ambo/task.rb

Overview

Small utility module for asynchronous task management

Class Method Summary collapse

Class Method Details

.create_pool(size = nil) ⇒ Object


6
7
8
9
10
# File 'lib/ambo/task.rb', line 6

def self.create_pool(size = nil)
  size ||= Concurrent::Utility::ProcessorCounter.new.processor_count

  Concurrent::FixedThreadPool.new(size)
end