<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.5.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSCondition/wait(until:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSCondition(im)waitUntilDate:"
  },
  "title" : "wait(until:)"
}
-->

# wait(until:)

Blocks the current thread until the condition is signaled or the specified time limit is reached.

```
func wait(until limit: Date) -> Bool
```

## Parameters

`limit`

The time at which to wake up the thread if the condition has not been signaled.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the condition was signaled; otherwise, <doc://com.apple.documentation/documentation/Swift/false> if the time limit was reached.

## Discussion

You must lock the receiver prior to calling this method.

## See Also

[`-  lock`](/documentation/Foundation/NSLocking/lock())

Attempts to acquire a lock, blocking a thread’s execution until the lock can be acquired.



---

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)