mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-21 07:59:26 +00:00
24 lines
1.0 KiB
Diff
24 lines
1.0 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com>
|
|
Date: Fri, 14 Jun 2024 17:34:17 -0400
|
|
Subject: [PATCH] Fix-MC-183518
|
|
|
|
Related MC issue: https://bugs.mojang.com/browse/MC-183518
|
|
|
|
diff --git a/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java b/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java
|
|
index f22fb84c7e7929d6c80c44b13179cf385d8a43f9..36ee0c16f5958204276057cbe582e8cb35a5296e 100644
|
|
--- a/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java
|
|
+++ b/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java
|
|
@@ -142,8 +142,9 @@ public abstract class BlockableEventLoop<R extends Runnable> implements Profiler
|
|
}
|
|
|
|
public void waitForTasks() {
|
|
- Thread.yield();
|
|
- LockSupport.parkNanos("waiting for tasks", 100000L);
|
|
+ // Leaf start - Fix MC-183518
|
|
+ LockSupport.parkNanos("waiting for tasks", 2000000L);
|
|
+ // Leaf end
|
|
}
|
|
|
|
protected void doRunTask(R task) {
|