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)
SourceInstance methods
active_count
Sourcecan_accept?
Sourcemax_workers
Sourcequeue_depth
Sourcequeue_size
Sourcerunning?
Sourcestart
Sourcestop
Sourcesubmit(task : Task) : Nil
Sourcesubmit?(task : Task) : Bool
Sourcetotal_queued
Sourcetry_submit(task : Task, timeout : Time::Span = 50.milliseconds) : Bool
Sourceutilization
Source