mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-03-10 13:49:17 +01:00
Made UnitSemaphoreAccessLock use a while loop to check condition
This commit is contained in:
parent
c0a210956d
commit
36ff87abf2
@ -80,11 +80,9 @@ public class GraphsJSONResolver implements Resolver {
|
|||||||
|
|
||||||
DataID dataID = getDataID(type);
|
DataID dataID = getDataID(type);
|
||||||
|
|
||||||
JSONStorage.StoredJSON graphJSON = getGraphJSON(request, dataID);
|
|
||||||
|
|
||||||
return Response.builder()
|
return Response.builder()
|
||||||
.setMimeType(MimeType.JSON)
|
.setMimeType(MimeType.JSON)
|
||||||
.setJSONContent(graphJSON.json)
|
.setJSONContent(getGraphJSON(request, dataID).json)
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ public class UnitSemaphoreAccessLock {
|
|||||||
public void enter() {
|
public void enter() {
|
||||||
try {
|
try {
|
||||||
synchronized (lockObject) {
|
synchronized (lockObject) {
|
||||||
if (accessing.get()) {
|
while (accessing.get()) {
|
||||||
lockObject.wait();
|
lockObject.wait();
|
||||||
}
|
}
|
||||||
accessing.set(true);
|
accessing.set(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user