mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00:00
Fix QueueHandler uncache
This commit is contained in:
parent
751e6a5dd4
commit
2e6f46e451
@ -267,6 +267,14 @@ public abstract class QueueHandler implements Trimable, Runnable {
|
||||
queuePool.set(null);
|
||||
}
|
||||
|
||||
private IQueueExtent pool() {
|
||||
IQueueExtent queue = queuePool.get();
|
||||
if (queue == null) {
|
||||
queuePool.set(queue = queuePool.init());
|
||||
}
|
||||
return queue;
|
||||
}
|
||||
|
||||
public abstract void startSet(boolean parallel);
|
||||
|
||||
public abstract void endSet(boolean parallel);
|
||||
@ -276,7 +284,7 @@ public abstract class QueueHandler implements Trimable, Runnable {
|
||||
}
|
||||
|
||||
public IQueueExtent getQueue(World world, IBatchProcessor processor) {
|
||||
final IQueueExtent queue = queuePool.get();
|
||||
final IQueueExtent queue = pool();
|
||||
IChunkCache<IChunkGet> cacheGet = getOrCreateWorldCache(world);
|
||||
IChunkCache<IChunkSet> set = null; // TODO cache?
|
||||
queue.init(world, cacheGet, set);
|
||||
|
Loading…
Reference in New Issue
Block a user