Synchronize updateAndAwait

This commit is contained in:
themode 2022-02-13 19:36:29 +01:00
parent 0ca5e2ade6
commit ab2fee2bac

View File

@ -56,7 +56,7 @@ public final class ThreadDispatcher<P> {
*
* @param time the tick time in milliseconds
*/
public void updateAndAwait(long time) {
public synchronized void updateAndAwait(long time) {
// Update dispatcher
this.updates.drain(update -> {
if (update instanceof DispatchUpdate.PartitionLoad<P> chunkUpdate) {