Hwaro::Core::Build::Parallel(T, R)
Inherits Reference / Object
Parallel processor for running work items concurrently
Constructors
new(config : ParallelConfig = ParallelConfig.new)
SourceInstance methods
count_success(items : Array(T), &block : T, Int32 -> R) : Int32
Process items in parallel, counting successes
map(items : Array(T), &block : T -> R) : Array(R)
Map items in parallel, returning only successful results
process(items : Array(T), &block : T, Int32 -> R) : Array(WorkResult(R))
Process items in parallel using a worker pool