<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: -",
    "macOS: 10.10.0 -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "Dispatch",
  "identifier" : "/documentation/Dispatch/DispatchWorkItem/wait(wallTimeout:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Dispatch"
    ],
    "preciseIdentifier" : "s:8Dispatch0A8WorkItemC4wait11wallTimeoutAA0aF6ResultOAA0A8WallTimeV_tF"
  },
  "title" : "wait(wallTimeout:)"
}
-->

# wait(wallTimeout:)

Causes the caller to wait synchronously until the dispatch work item finishes executing, or until the specified time elapses.

```
func wait(wallTimeout: DispatchWallTime) -> DispatchTimeoutResult
```

## Parameters

`wallTimeout`

The time at which to stop waiting for the dispatch item to finish. Specifying [`distantFuture`](/documentation/Dispatch/DispatchTime/distantFuture) is equivalent to calling the [`wait()`](/documentation/Dispatch/DispatchWorkItem/wait()) method.

## Return Value

[`DispatchTimeoutResult.success`](/documentation/Dispatch/DispatchTimeoutResult/success) if the method returned because the work item finished executing, or [`DispatchTimeoutResult.timedOut`](/documentation/Dispatch/DispatchTimeoutResult/timedOut) if the timeout value was reached.

## Discussion

This method returns immediately if the current work item has already finished executing.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)