Skip to content

Commit 2eecad7

Browse files
committed
remove Thread.onSpinWait again as not clear this is needed or has maybe negative effects
1 parent ab06e30 commit 2eecad7

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

src/main/java/graphql/execution/instrumentation/dataloader/PerLevelDataLoaderDispatchStrategy.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ public StateForLevel(@Nullable DataLoaderInvocation dataLoaderInvocation,
9797
if (currentStateRef.compareAndSet(currentState, newState)) {
9898
return currentState;
9999
}
100-
Thread.onSpinWait();
101100
}
102101
}
103102

@@ -125,7 +124,6 @@ public boolean newDataLoaderInvocation(DataLoaderInvocation dataLoaderInvocation
125124
if (currentStateRef.compareAndSet(currentState, newState)) {
126125
return newDelayedInvocation;
127126
}
128-
Thread.onSpinWait();
129127
}
130128
}
131129

@@ -261,7 +259,6 @@ public void executeObject(ExecutionContext executionContext, ExecutionStrategyPa
261259
if (callStack.tryUpdateLevel(curLevel, currentState, currentState.increaseHappenedExecuteObjectCalls())) {
262260
return;
263261
}
264-
Thread.onSpinWait();
265262
}
266263
}
267264

@@ -286,7 +283,6 @@ private void onCompletionFinished(int level, CallStack callStack) {
286283
if (callStack.tryUpdateLevel(level, currentState, currentState.increaseHappenedCompletionFinishedCount())) {
287284
break;
288285
}
289-
Thread.onSpinWait();
290286
}
291287

292288
// due to synchronous DataFetcher the completion calls on higher levels
@@ -348,7 +344,6 @@ public void subscriptionEventCompletionDone(AlternativeCallContext alternativeCa
348344
if (callStack.tryUpdateLevel(0, currentState, currentState.increaseHappenedExecuteObjectCalls())) {
349345
break;
350346
}
351-
Thread.onSpinWait();
352347
}
353348
onCompletionFinished(0, callStack);
354349
}

0 commit comments

Comments
 (0)