Skip to content
This repository was archived by the owner on Apr 22, 2025. It is now read-only.

Commit f3c854d

Browse files
committed
tweak patch
1 parent 964ed0a commit f3c854d

8 files changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+
From: 404Setup <153366651+404Setup@users.noreply.github.com>
3+
Date: Mon, 24 Jun 2024 16:52:04 +0800
4+
Subject: [PATCH] Leaf: Fix-MC-183518
5+
6+
Related MC issue: https://bugs.mojang.com/browse/MC-183518
7+
8+
diff --git a/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java b/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java
9+
index 21d98fc8f006d1f445752f6ecd60e24dd6126272..864df43e14a14b87d9ba97286a11b9b828103276 100644
10+
--- a/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java
11+
+++ b/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java
12+
@@ -150,8 +150,10 @@ public abstract class BlockableEventLoop<R extends Runnable> implements Profiler
13+
}
14+
15+
public void waitForTasks() {
16+
- Thread.yield();
17+
- LockSupport.parkNanos("waiting for tasks", 100000L);
18+
+ // Leaf start - Fix MC-183518
19+
+ // Thread.yield();
20+
+ LockSupport.parkNanos("waiting for tasks", 2000000L);
21+
+ // Leaf end
22+
}
23+
24+
protected void doRunTask(R task) {

0 commit comments

Comments
 (0)