Skip to content

Commit b423d47

Browse files
committed
switch from yield to onSpinWait when adding statements in LMDB store
1 parent 860ffb1 commit b423d47

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

core/sail/lmdb/src/main/java/org/eclipse/rdf4j/sail/lmdb/LmdbSailStore.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ public void approveAll(Set<Statement> approved, Set<Resource> approvedContexts)
596596
if (tripleStoreException != null) {
597597
throw wrapTripleStoreException();
598598
}
599-
Thread.yield();
599+
Thread.onSpinWait();
600600
}
601601

602602
} else {
@@ -733,7 +733,7 @@ private void addStatement(Resource subj, IRI pred, Value obj, boolean explicit,
733733
if (tripleStoreException != null) {
734734
throw wrapTripleStoreException();
735735
} else {
736-
Thread.yield();
736+
Thread.onSpinWait();
737737
}
738738
}
739739
} else {

0 commit comments

Comments
 (0)