---
title: "nestedWaiter(_:wasInterruptedByTimedOutWaiter:)"
framework: xctest
role: symbol
role_heading: Instance Method
path: "xctest/xctwaiterdelegate/nestedwaiter(_:wasinterruptedbytimedoutwaiter:)"
---

# nestedWaiter(_:wasInterruptedByTimedOutWaiter:)

Invoked when the waiter is interrupted prior to its expectations being fulfilled or timing out.

## Declaration

```swift
optional func nestedWaiter(_ waiter: XCTWaiter, wasInterruptedByTimedOutWaiter outerWaiter: XCTWaiter)
```

## Discussion

Discussion This occurs when an “outer” waiter times out, resulting in any waiters nested inside it being interrupted to allow the call stack to quickly unwind.

## See Also

### Timeout Events

- [waiter(_:didTimeoutWithUnfulfilledExpectations:)](xctest/xctwaiterdelegate/waiter(_:didtimeoutwithunfulfilledexpectations:).md)
