Skip to content

Commit bcc4f63

Browse files
committed
inherit NSObject to insert NSMutableDictionary
1 parent 0d9d290 commit bcc4f63

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/XCTest/Private/WaiterManager.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ extension DispatchWorkItem: ManageableWaiterWatchdog {}
2626
/// This class manages the XCTWaiter instances which are currently waiting on a particular thread.
2727
/// It facilitates "nested" waiters, allowing an outer waiter to interrupt inner waiters if it times
2828
/// out.
29-
internal final class WaiterManager<WaiterType: ManageableWaiter> {
29+
internal final class WaiterManager<WaiterType: ManageableWaiter> : NSObject {
3030

3131
/// The current thread's waiter manager. This is the only supported way to access an instance of
3232
/// this class, since each instance is bound to a particular thread and is only concerned with
@@ -53,7 +53,7 @@ internal final class WaiterManager<WaiterType: ManageableWaiter> {
5353
private let queue = DispatchQueue(label: "org.swift.XCTest.WaiterManager")
5454

5555
// Use `WaiterManager.current` to access the thread-specific instance
56-
private init() {}
56+
private override init() {}
5757

5858
deinit {
5959
assert(managedWaiterStack.isEmpty, "Waiters still registered when WaiterManager is deallocating.")

0 commit comments

Comments
 (0)