Skip to content

Commit 6a5b678

Browse files
authored
Add Task cancellation check in shrinker
1 parent dfaf774 commit 6a5b678

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Sources/PropertyBased/PropertyCheck.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@ public func propertyCheck<InputValue, ResultValue>(
142142
let candidates = input._shrinker(shrunkenInput)
143143

144144
for c in candidates {
145+
guard !Task.isCancelled else { return }
146+
145147
guard let mappedShrunk = input._mapFilter(c) else { continue }
146148

147149
let shrunkIssues = await countIssues(isolation: isolation, suppress: true) {

0 commit comments

Comments
 (0)