-
dispatchLimitDefault implementationThe maximum amount of
Dispatches that are accepted in a single dispatch call. Default is 1.Default Implementation
Declaration
Swift
var dispatchLimit: Int { get } -
Sends the provided
Dispatches to some specific entity to handle them.Declaration
Swift
func dispatch(_ data: [Dispatch], completion: @escaping ([Dispatch]) -> Void) -> DisposableParameters
dataThe
Dispatches that have to be sent. They will always be less then or equal to thedispatchLimit.completionThe callback that needs to be called when one or more
Dispatches have completed. Completed in this case means both if it succeeded, or if it failed and won’t be retried. This callback can be called multiple times, but must contain eachDispatchexactly once. AllDispatches provided in the data parameter need to be passed back in the completion block at some point to allow for it to be cleared from the queue and avoid multiple dispatches of the same events.Return Value
A
Disposablethat can be used to cancel the dispatch process if still in progress.
View on GitHub