ConcurrencyLimitedDispatcher

public final class ConcurrencyLimitedDispatcher : Dispatcher

A PromiseKit Dispatcher that allows no more than X simultaneous executions at once.

  • A PromiseKit Dispatcher that allows no more than X simultaneous executions at once.

    Declaration

    Swift

    public init(limit: Int, queue: Dispatcher = DispatchQueue.global(qos: .background))

    Parameters

    limit

    The number of executions that may run at once.

    queue

    The DispatchQueue or Dispatcher on which to perform executions. Should be some form of concurrent queue.

  • Undocumented

    Declaration

    Swift

    public convenience init(limit: Int, queue: DispatchQueue)
  • Undocumented

    Declaration

    Swift

    public func dispatch(_ body: @escaping () -> Void)