Instance Method

wait(wallTimeout:)

Waits synchronously for the previously submitted work to complete, and returns if the work is not completed before the specified timeout period has elapsed.

Declaration

func wait(wallTimeout timeout: DispatchWallTime) -> DispatchTimeoutResult

Parameters

timeout

The latest time to wait for a group to complete.

Return Value

DispatchTimeoutResult.timedOut if the method returned due to a timeout, or DispatchTimeoutResult.success if the tasks completed.

See Also

Waiting for Tasks to Finish Executing

func wait()

Waits synchronously for the previously submitted work to finish.

func wait(timeout: DispatchTime) -> DispatchTimeoutResult

Waits synchronously for the previously submitted work to complete, and returns if the work is not completed before the specified timeout period has elapsed.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software