Skip to content

Commit

Permalink
switch from yield to onSpinWait when adding statements in LMDB store
Browse files Browse the repository at this point in the history
  • Loading branch information
hmottestad committed Jun 5, 2024
1 parent 860ffb1 commit b423d47
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ public void approveAll(Set<Statement> approved, Set<Resource> approvedContexts)
if (tripleStoreException != null) {
throw wrapTripleStoreException();
}
Thread.yield();
Thread.onSpinWait();
}

} else {
Expand Down Expand Up @@ -733,7 +733,7 @@ private void addStatement(Resource subj, IRI pred, Value obj, boolean explicit,
if (tripleStoreException != null) {
throw wrapTripleStoreException();
} else {
Thread.yield();
Thread.onSpinWait();
}
}
} else {
Expand Down

0 comments on commit b423d47

Please sign in to comment.