Remove comment and fix build }}}}}
This commit is contained in:
parent
3ab1f229c5
commit
b71c0e6f49
|
@ -1,4 +1,4 @@
|
||||||
From fadf46bd5f5d74c2a61e95601b3bd3704b16d71b Mon Sep 17 00:00:00 2001
|
From a1cf500c7a15721dfa81f4607e6f67f4cc7246a7 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Mon, 16 May 2016 20:47:41 -0400
|
Date: Mon, 16 May 2016 20:47:41 -0400
|
||||||
Subject: [PATCH] Optimize UserCache / Thread Safe
|
Subject: [PATCH] Optimize UserCache / Thread Safe
|
||||||
|
@ -23,7 +23,7 @@ index ec9f037..7e7ec23 100644
|
||||||
// Spigot end
|
// Spigot end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/UserCache.java b/src/main/java/net/minecraft/server/UserCache.java
|
diff --git a/src/main/java/net/minecraft/server/UserCache.java b/src/main/java/net/minecraft/server/UserCache.java
|
||||||
index 5cc2731..ca20b3d 100644
|
index 5cc2731..2420112 100644
|
||||||
--- a/src/main/java/net/minecraft/server/UserCache.java
|
--- a/src/main/java/net/minecraft/server/UserCache.java
|
||||||
+++ b/src/main/java/net/minecraft/server/UserCache.java
|
+++ b/src/main/java/net/minecraft/server/UserCache.java
|
||||||
@@ -108,7 +108,7 @@ public class UserCache {
|
@@ -108,7 +108,7 @@ public class UserCache {
|
||||||
|
@ -75,7 +75,7 @@ index 5cc2731..ca20b3d 100644
|
||||||
+ public void c(boolean asyncSave) {
|
+ public void c(boolean asyncSave) {
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
String s = this.b.toJson(this.a(org.spigotmc.SpigotConfig.userCacheCap));
|
String s = this.b.toJson(this.a(org.spigotmc.SpigotConfig.userCacheCap));
|
||||||
+ Runnable save = () -> { // Paper - ensure only 1 file is writing at same time by syncing to the FD
|
+ Runnable save = () -> {
|
||||||
+
|
+
|
||||||
BufferedWriter bufferedwriter = null;
|
BufferedWriter bufferedwriter = null;
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ index 5cc2731..ca20b3d 100644
|
||||||
IOUtils.closeQuietly(bufferedwriter);
|
IOUtils.closeQuietly(bufferedwriter);
|
||||||
}
|
}
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ }};
|
+ };
|
||||||
+ if (asyncSave) {
|
+ if (asyncSave) {
|
||||||
+ MCUtil.scheduleAsyncTask(save);
|
+ MCUtil.scheduleAsyncTask(save);
|
||||||
+ } else {
|
+ } else {
|
||||||
|
|
Loading…
Reference in New Issue