Fix File Handler threads sometimes looping infinitely

This commit is contained in:
James Seibel
2024-10-08 19:51:39 -05:00
parent 2d8bad9aec
commit 3b5208d774
@@ -160,7 +160,7 @@ public class LodRenderSection implements IDebugRenderable, AutoCloseable
try
{
ColumnRenderSource thisRenderSource = loadedRenderSources.getThisRenderSource();
if (thisRenderSource != null && !thisRenderSource.isEmpty())
if (thisRenderSource != null)
{
CompletableFuture<LodQuadBuilder> buildDataFuture = this.buildNewRenderDataAsync(thisRenderSource, loadedRenderSources);
buildDataFuture.thenRun(loadedRenderSources::decrementRefCounts);
@@ -169,6 +169,9 @@ public class LodRenderSection implements IDebugRenderable, AutoCloseable
else
{
// nothing needs to be rendered
// TODO how doesn't this cause infinite file handler loops?
// to trigger an upload we check if the buffer is null, and we aren't
// setting the render buffer here
this.canRender = false;
this.buildAndUploadRenderDataToGpuFuture = null;
this.bufferBuildFuture = null;