Commander(T)
Inherits Reference < Object
A commander can dispatch blocks to run concurrently. The caller can dictate the number of concurrent jobs by passing in a max concurrency at the time of initialization.
Constants
Constructors
Initializes a new instance of this class with the given max concurrency. Max concurrency will dictate the number of concurrent jobs. All dispatched job will run concurrently if max concurrency is set to zero.
Class methods
Creates a new instance with the given result capacity, without concurrency limit.
Creates a new instance with a concurrency limit, using the default result capacity.
Instance methods
Collects the result of the dispatched calls. This function will only return once all the dispatched calls are finished. This function will raise the first error that it received from any of the dispatched calls.
Collects the result of the dispatched calls.
This function will only return once all the dispatched calls are finished.
This function does not raise any exception from the dispatched calls.
The exceptions are wrapped in Try(T), with has_result set to false.
Dispatches the given block to run in a new fiber. Note: the spawned fiber will block if max concurrency is hit, and will only proceed to invoke the given block when previously spawned fibers finishes.