DispatchQueue

extension DispatchQueue: Executor

Dispatch queues invoke function bodies submitted to them serially in FIFO order. A queue will only invoke one-at-a-time, but independent queues may each invoke concurrently with respect to each other.

  • A generic catch-all dispatch queue, for when you just want to throw some work onto the concurrent pile. As an alternative to the .utility QoS global queue, work dispatched onto this queue on platforms with support for QoS will match the QoS of the caller.

    Declaration

    Swift

    public static func any() -> DispatchQueue
  • Declaration

    Swift

    public func submit(_ body: @escaping() -> Void)
  • Declaration

    Swift

    public func submit(_ workItem: DispatchWorkItem)