Skip to content

Commit

Permalink
Some wait fix.
Browse files Browse the repository at this point in the history
Signed-off-by: Radek Felcman <[email protected]>
  • Loading branch information
rfelcman committed Apr 24, 2024
1 parent e0f0cf5 commit 153e63d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
import org.eclipse.persistence.sessions.DataRecord;
import org.eclipse.persistence.sessions.DatabaseRecord;

import java.util.concurrent.TimeUnit;

/**
* <p><b>Purpose</b>: Container class for storing objects in an IdentityMap.
* <p><b>Responsibilities</b>:<ul>
Expand Down Expand Up @@ -612,7 +614,7 @@ public Object waitForObject(){
while (this.object == null && isAcquired()) {
if (count > MAX_WAIT_TRIES)
throw ConcurrencyException.maxTriesLockOnBuildObjectExceded(getActiveThread(), Thread.currentThread());
wait(10);
getInstanceLockCondition().await(10, TimeUnit.MILLISECONDS);
++count;
}
} catch(InterruptedException ex) {
Expand Down

0 comments on commit 153e63d

Please sign in to comment.