Skip to content

Commit

Permalink
OAK-11070 - WriteAccessController: avoid race condition (apache#1676)
Browse files Browse the repository at this point in the history
Co-authored-by: Axel Hanikel <ahanikel@adobe.com>
  • Loading branch information
ahanikel and Axel Hanikel authored Sep 17, 2024
1 parent 0956aba commit 717769f
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ public void enableWriting() {
public void checkWritingAllowed() {
while (!isWritingAllowed) {
synchronized (lock) {
if (isWritingAllowed) {
return;
}
try {
lock.wait();
} catch (InterruptedException e) {
Expand Down

0 comments on commit 717769f

Please sign in to comment.