Update SingleThreadQueueExtent.java

This commit is contained in:
IronApollo 2020-03-31 20:29:03 -04:00
parent 6e1cb4cfbc
commit 110347214e

View File

@ -156,7 +156,12 @@ public class SingleThreadQueueExtent extends ExtentBatchProcessorHolder implemen
} }
if (Fawe.isMainThread()) { if (Fawe.isMainThread()) {
return (V) chunk.call(); V result = (V)chunk.call();
if (result == null){
return (V) (Future) Futures.immediateFuture(null);
}else{
return result;
}
} }
return (V) Fawe.get().getQueueHandler().submit(chunk); return (V) Fawe.get().getQueueHandler().submit(chunk);