GroupWork

public class GroupWork

Used to perform groups of work and keep track of the results.

  • The current result of the work items.

    Declaration

    Swift

    public var result = true
  • Initializes a GroupWork.

    Declaration

    Swift

    public init()
  • Should be called before some asynchronous work begins.

    Declaration

    Swift

    public func start()
  • Should be called after some asynchronous work is done.

    Declaration

    Swift

    public func finish(withResult result: Bool)

    Parameters

    result

    The Bool result of the work that just finished. This will get &&‘d with the current result.

  • Handles what to do once all work is done.

    Declaration

    Swift

    public func allDone(completion: @escaping () -> Void)

    Parameters

    completion

    The function to be executed when ALL work is done.