Class: Hackle::Executors
- Inherits:
-
Object
- Object
- Hackle::Executors
- Defined in:
- lib/hackle/internal/concurrent/executors.rb
Class Method Summary collapse
- .scheduler ⇒ TimerScheduler
- .thread_pool(pool_size:, queue_capacity:) ⇒ Concurrent::ThreadPoolExecutor
Class Method Details
.scheduler ⇒ TimerScheduler
16 17 18 |
# File 'lib/hackle/internal/concurrent/executors.rb', line 16 def self.scheduler TimerScheduler.new end |
.thread_pool(pool_size:, queue_capacity:) ⇒ Concurrent::ThreadPoolExecutor
11 12 13 |
# File 'lib/hackle/internal/concurrent/executors.rb', line 11 def self.thread_pool(pool_size:, queue_capacity:) Concurrent::ThreadPoolExecutor.new(min_threads: pool_size, max_threads: pool_size, max_queue: queue_capacity) end |