diff --git a/FlowSched b/FlowSched index 77c965bab..491bc6a73 160000 --- a/FlowSched +++ b/FlowSched @@ -1 +1 @@ -Subproject commit 77c965bab976212720cc93ddbf7388bb1acc1ebc +Subproject commit 491bc6a731b724d44072bfb7d51eea3433214cb6 diff --git a/c2me-base/src/main/java/com/ishland/c2me/base/common/scheduler/SingleThreadExecutor.java b/c2me-base/src/main/java/com/ishland/c2me/base/common/scheduler/SingleThreadExecutor.java index f39adf600..cbb1ddadb 100644 --- a/c2me-base/src/main/java/com/ishland/c2me/base/common/scheduler/SingleThreadExecutor.java +++ b/c2me-base/src/main/java/com/ishland/c2me/base/common/scheduler/SingleThreadExecutor.java @@ -28,14 +28,14 @@ public void run() { return; } - // attempt to spin-wait before sleeping - if (!pollTasks()) { - Thread.interrupted(); // clear interrupt flag - for (int i = 0; i < 5000; i ++) { - if (pollTasks()) continue main_loop; - LockSupport.parkNanos("Spin-waiting for tasks", 10_000); // 100us - } - } +// // attempt to spin-wait before sleeping +// if (!pollTasks()) { +// Thread.interrupted(); // clear interrupt flag +// for (int i = 0; i < 5000; i ++) { +// if (pollTasks()) continue main_loop; +// LockSupport.parkNanos("Spin-waiting for tasks", 10_000); // 100us +// } +// } synchronized (sync) { if (this.size.get() != 0 || this.shutdown.get()) continue main_loop; diff --git a/c2me-rewrites-chunkio/src/main/java/com/ishland/c2me/rewrites/chunkio/common/C2MEStorageThread.java b/c2me-rewrites-chunkio/src/main/java/com/ishland/c2me/rewrites/chunkio/common/C2MEStorageThread.java index 6d6da7a2e..9f6cdfba1 100644 --- a/c2me-rewrites-chunkio/src/main/java/com/ishland/c2me/rewrites/chunkio/common/C2MEStorageThread.java +++ b/c2me-rewrites-chunkio/src/main/java/com/ishland/c2me/rewrites/chunkio/common/C2MEStorageThread.java @@ -93,14 +93,14 @@ public void run() { this.closeFuture.complete(null); break; } else { - // attempt to spin-wait before sleeping - if (!pollTasks()) { - Thread.interrupted(); // clear interrupt flag - for (int i = 0; i < 5000; i ++) { - if (pollTasks() || this.closing.get()) continue main_loop; - LockSupport.parkNanos("Spin-waiting for tasks", 10_000); // 100us - } - } +// // attempt to spin-wait before sleeping +// if (!pollTasks()) { +// Thread.interrupted(); // clear interrupt flag +// for (int i = 0; i < 5000; i ++) { +// if (pollTasks() || this.closing.get()) continue main_loop; +// LockSupport.parkNanos("Spin-waiting for tasks", 10_000); // 100us +// } +// } synchronized (sync) { if (this.taskSize.get() != 0 || this.closing.get()) continue main_loop; try {