Files
swift-mirror/test/expr/closure/implicit_weak_capture.swift
Mike Ash d0248afd14 [Test] Make implicit_weak_capture.swift more robust.
This test creates an object then checks a weak reference to that object on a background thread. It was doing this check after 10ms, and any small hiccup could potentially delay the object's destruction enough to spuriously fail.

Rearrange the test to check the weak reference in a loop for several seconds before giving up. This makes it very fast on success (it's done the moment it sees nil) while being robust against up to several seconds of delay in destroying the object if that happens.

rdar://149868181
2025-06-03 17:08:41 -04:00

1.5 KiB