Skip to content

Commit

Permalink
GH-2998 possible improvement to the Changeset
Browse files Browse the repository at this point in the history
  • Loading branch information
hmottestad committed May 9, 2024
1 parent 610eed1 commit 3dd4931
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,21 @@ Iterable<Triple> getApprovedTriples(Resource subj, IRI pred, Value obj) {

void removeApproved(Statement next) {
assert !closed;

Model localApproved = approved;
if (localApproved != null && !localApproved.contains(next)) {
boolean readLock = readWriteLock.readLock();
try {
if (approved != null && !approvedEmpty) {
if (!approved.contains(next)) {
return;
}
}
} finally {
readWriteLock.unlockReader(readLock);
}
}

long writeLock = readWriteLock.writeLock();
try {
if (approved != null) {
Expand Down

0 comments on commit 3dd4931

Please sign in to comment.