Queuer

public class Queuer

Queuer class.

  • Add an Operation to be executed asynchronously.

    Declaration

    Swift

    public func addOperation(_ operation: @escaping () -> Void)

    Parameters

    block

    Block to be executed.

  • Add an Operation to be executed asynchronously.

    Declaration

    Swift

    public func addOperation(_ operation: Operation)

    Parameters

    operation

    Operation to be executed.

  • Add an Array of chained Operations.

    Example:

    [A, B, C] = A -> B -> C -> completionHandler.
    

    Declaration

    Swift

    public func addChainedOperations(_ operations: [Operation], completionHandler: (() -> Void)? = nil)

    Parameters

    operations

    Operations Array.

    completionHandler

    Completion block to be exectuted when all Operations are finished.

  • Add an Array of chained Operations.

    Example:

    [A, B, C] = A -> B -> C -> completionHandler.
    

    Declaration

    Swift

    public func addChainedOperations(_ operations: Operation..., completionHandler: (() -> Void)? = nil)

    Parameters

    operations

    Operations list.

    completionHandler

    Completion block to be exectuted when all Operations are finished.

  • Add a completion block to the queue.

    Declaration

    Swift

    public func addCompletionHandler(_ completionHandler: @escaping () -> Void)

    Parameters

    completionHandler

    Completion handler to be executed as last Operation.