Skip to content

Commit 6ef450e

Browse files
committed
Add Task cancellation check in shrinker
1 parent dfaf774 commit 6ef450e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

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)