class

HT2::WorkerPool

Inherits Reference < Object

A bounded worker pool for handling stream processing with configurable concurrency limits. This prevents unbounded fiber creation and provides backpressure for slow consumers.

Constructors

new(max_workers : Int32 = 100, queue_size : Int32 = 1000)
Source

Instance methods

active_count
Source
can_accept?
Source
max_workers
Source
queue_depth
Source
queue_size
Source
running?
Source
start
Source
stop
Source
submit(task : Task) : Nil
Source
submit?(task : Task) : Bool
Source
total_queued
Source
try_submit(task : Task, timeout : Time::Span = 50.milliseconds) : Bool
Source
utilization
Source

Nested types