Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion TestFoundation/TestNSLock.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,14 @@ class TestNSLock: XCTestCase {
}

let thread = Thread() {
lock.lock()

// Now wake up the main thread so it can try to obtain the lock that
// this thread just obtained.
condition.lock()
condition.signal()
condition.unlock()

lock.lock()
Thread.sleep(forTimeInterval: 8)
lock.unlock()
}
Expand Down