Skip to content

Commit ab222f2

Browse files
zsmooreCopilot
andauthored
Update src/main/java/org/dataloader/strategy/BreadthFirstChainedDispatchStrategy.java
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 797761d commit ab222f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/org/dataloader/strategy/BreadthFirstChainedDispatchStrategy.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ public void onRegistryCreation(DataLoaderRegistry registry) {
3939
public void loadCalled() {
4040
// initial load called
4141
pendingLoadCount.incrementAndGet();
42-
totalWorkCount.incrementAndGet();
43-
if (totalWorkCount.get() == 1) {
42+
int previousTotal = totalWorkCount.getAndIncrement();
43+
if (previousTotal == 0) {
4444
triggerDeterministicDispatch();
4545
}
4646
}

0 commit comments

Comments
 (0)