Did not double-flush the file io thread if async = false
This commit is contained in:
Spottedleaf 2019-09-01 14:18:40 -07:00 committed by Zach
parent c9fd745840
commit 5272f3c2ef

View file

@ -1,4 +1,4 @@
From ff18dd64465a554b12f1a701bbcce73a9d91074c Mon Sep 17 00:00:00 2001 From 7455060cae4cb4693f0a8146d3456d96884a72ad Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com> From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Sat, 13 Jul 2019 09:23:10 -0700 Date: Sat, 13 Jul 2019 09:23:10 -0700
Subject: [PATCH] Asynchronous chunk IO and loading Subject: [PATCH] Asynchronous chunk IO and loading
@ -1886,10 +1886,10 @@ index 000000000..1dfa8abfd
+} +}
diff --git a/src/main/java/com/destroystokyo/paper/io/chunk/ChunkTaskManager.java b/src/main/java/com/destroystokyo/paper/io/chunk/ChunkTaskManager.java diff --git a/src/main/java/com/destroystokyo/paper/io/chunk/ChunkTaskManager.java b/src/main/java/com/destroystokyo/paper/io/chunk/ChunkTaskManager.java
new file mode 100644 new file mode 100644
index 000000000..98a9744a0 index 000000000..695e9909f
--- /dev/null --- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/io/chunk/ChunkTaskManager.java +++ b/src/main/java/com/destroystokyo/paper/io/chunk/ChunkTaskManager.java
@@ -0,0 +1,429 @@ @@ -0,0 +1,428 @@
+package com.destroystokyo.paper.io.chunk; +package com.destroystokyo.paper.io.chunk;
+ +
+import com.destroystokyo.paper.io.PaperFileIOThread; +import com.destroystokyo.paper.io.PaperFileIOThread;
@ -2239,11 +2239,10 @@ index 000000000..98a9744a0
+ }); + });
+ wait.join(); + wait.join();
+ } + }
+ return; + } else {
+ } + for (final QueueExecutorThread<ChunkTask> worker : this.workers) {
+ + worker.flush();
+ for (final QueueExecutorThread<ChunkTask> worker : this.workers) { + }
+ worker.flush();
+ } + }
+ +
+ // flush again since tasks we execute async saves + // flush again since tasks we execute async saves
@ -3821,5 +3820,5 @@ index a1d93200e..6ca0ebfde 100644
log.log( Level.SEVERE, "------------------------------" ); log.log( Level.SEVERE, "------------------------------" );
// //
-- --
2.23.0 2.22.1