ocibuild_http_pool (ocibuild v0.10.4)
View SourceHTTP pool coordinator for parallel operations.
This gen_server coordinates parallel HTTP operations with bounded
concurrency. It provides a pmap/2,3 interface similar to the
existing pmap_bounded/3 but uses supervised HTTP workers.
Key features:
- Bounded concurrency (default: 4 workers)
- Results returned in original order
- Fail-fast: one worker crash fails entire operation
- Clean shutdown via OTP supervision
Summary
Functions
Execute function on each item in parallel, return results in order.
Execute function on each item in parallel with specified max concurrency.
Start the HTTP pool coordinator.
Stop the pool coordinator.
Functions
Execute function on each item in parallel, return results in order.
Uses default max concurrency of 4 workers.
-spec pmap(Fun :: fun((term()) -> term()), Items :: [term()], MaxWorkers :: pos_integer()) -> [term()].
Execute function on each item in parallel with specified max concurrency.
Returns results in the same order as input items. If any worker crashes or returns an error, the entire operation fails.
Start the HTTP pool coordinator.
-spec stop() -> ok.
Stop the pool coordinator.
This will cause the supervisor to shut down via auto_shutdown.