SPIGOT-5378: Fix TileEntity fixer deadlock
Chunk loading logic can make getTileEntity calls, and these can be off of the main thread (i.e lighting). The TileEntity fixer makes a getType call, which will block on chunk load. Thus a deadlock can occur between a lighting thread and the server thread. By: Spottedleaf <Spottedleaf@users.noreply.github.com>
This commit is contained in:
@@ -23,6 +23,15 @@
|
||||
public abstract class World implements IIBlockAccess, GeneratorAccess, AutoCloseable {
|
||||
|
||||
protected static final Logger LOGGER = LogManager.getLogger();
|
||||
@@ -23,7 +39,7 @@
|
||||
protected final List<TileEntity> tileEntityListPending = Lists.newArrayList();
|
||||
protected final List<TileEntity> tileEntityListUnload = Lists.newArrayList();
|
||||
private final long b = 16777215L;
|
||||
- private final Thread serverThread;
|
||||
+ final Thread serverThread; // CraftBukkit - package private
|
||||
private int u;
|
||||
protected int i = (new Random()).nextInt();
|
||||
protected final int j = 1013904223;
|
||||
@@ -41,7 +57,51 @@
|
||||
protected boolean tickingTileEntities;
|
||||
private final WorldBorder worldBorder;
|
||||
|
||||
Reference in New Issue
Block a user