Fix cleaning, add assertion
This commit is contained in:
@@ -337,6 +337,9 @@ public class RenderGenerationService {
|
|||||||
}
|
}
|
||||||
this.taskMapLock.unlockWrite(stamp);
|
this.taskMapLock.unlockWrite(stamp);
|
||||||
}
|
}
|
||||||
|
if (this.taskQueueCount.get() != 0) {
|
||||||
|
throw new IllegalStateException();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private long lastChangedTime = 0;
|
private long lastChangedTime = 0;
|
||||||
|
|||||||
@@ -667,7 +667,6 @@ public class AsyncNodeManager {
|
|||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO CLEAN
|
|
||||||
while (true) {
|
while (true) {
|
||||||
var buffer = this.requestBatchQueue.poll();
|
var buffer = this.requestBatchQueue.poll();
|
||||||
if (buffer == null) break;
|
if (buffer == null) break;
|
||||||
@@ -675,7 +674,7 @@ public class AsyncNodeManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
var buffer = this.requestBatchQueue.poll();
|
var buffer = this.removeBatchQueue.poll();
|
||||||
if (buffer == null) break;
|
if (buffer == null) break;
|
||||||
buffer.free();
|
buffer.free();
|
||||||
}
|
}
|
||||||
@@ -686,6 +685,12 @@ public class AsyncNodeManager {
|
|||||||
buffer.free();
|
buffer.free();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
while (true) {
|
||||||
|
var section = this.childUpdateQueue.poll();
|
||||||
|
if (section == null) break;
|
||||||
|
section.release();
|
||||||
|
}
|
||||||
|
|
||||||
if (RESULT_HANDLE.get(this) != null) {
|
if (RESULT_HANDLE.get(this) != null) {
|
||||||
var result = (SyncResults)RESULT_HANDLE.getAndSet(this, null);
|
var result = (SyncResults)RESULT_HANDLE.getAndSet(this, null);
|
||||||
result.geometryUpload.free();
|
result.geometryUpload.free();
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ public class VoxyInstance {
|
|||||||
this.importManager.cancelImport(world);
|
this.importManager.cancelImport(world);
|
||||||
|
|
||||||
if (world.getActiveSectionCount() != 0) {
|
if (world.getActiveSectionCount() != 0) {
|
||||||
Logger.warn("Waiting for world to finish use");
|
Logger.warn("Waiting for world to finish use: " + world );
|
||||||
while (world.getActiveSectionCount() != 0) {
|
while (world.getActiveSectionCount() != 0) {
|
||||||
try {
|
try {
|
||||||
Thread.sleep(100);
|
Thread.sleep(100);
|
||||||
|
|||||||
Reference in New Issue
Block a user