Update FCollectionTest.java

prior to the threadsafeiterable restoration
This commit is contained in:
kevlahnota
2024-12-05 12:50:53 +08:00
committed by GitHub
parent f637bd970b
commit d06673e401

View File

@@ -48,7 +48,7 @@ public class FCollectionTest {
cards.add(new Card(i, null));
CardCollection cc = new CardCollection(cards);
List<CompletableFuture<Integer>> futures = new ArrayList<>();
for (Card c : cc) {
for (Card c : cc.threadSafeIterable()) {
futures.add(CompletableFuture.supplyAsync(() -> {
if (c.getId() % 2 > 0)
cc.remove(c);