Skip to content

Commit ed4f8fa

Browse files
committed
Update comments for concurrent test
1 parent b63ea52 commit ed4f8fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Modules/Tests/NetworkingTests/Network/AlamofireNetworkErrorHandlerTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ final class AlamofireNetworkErrorHandlerTests: XCTestCase {
580580
failure: error
581581
)
582582

583-
// When - multiple threads simultaneously try to flag and remove the SAME item
583+
// When - multiple threads concurrently try to flag and remove the SAME item
584584
// This would cause a race condition in the old code where:
585585
// 1. Thread A reads the array, finds index 0
586586
// 2. Thread B reads the array, finds index 0
@@ -600,7 +600,7 @@ final class AlamofireNetworkErrorHandlerTests: XCTestCase {
600600
}
601601
}
602602

603-
// Force threads to start as close together as possible
603+
// Wait for all threads to complete
604604
group.wait()
605605

606606
// Then - no crashes should occur (especially no EXC_BREAKPOINT from array index out of bounds)

0 commit comments

Comments
 (0)