Foundational work for Future Memory usage improvements

This commit doesn't do much on its own, but adds a new Java Cleaner API
that lets us hook into Garbage Collector events to reclaim pooled objects and
return them to the pool.

Adds framework for Network Packets to know when a packet has finished dispatching
to get an idea when a packet is done sending to players.

Rewrites PooledObjects impl to properly respect max pool size and remove
almost all risk of contention.

Bumps the Paper Async Task Queue to use 2 threads, and properly shuts it down on shutdown.
This commit is contained in:
Aikar
2020-05-16 21:38:19 -04:00
parent 4e7644ce04
commit 90072b811c
7 changed files with 284 additions and 163 deletions

View File

@@ -226,7 +226,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+import java.util.Set;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Executor;
import java.util.concurrent.LinkedBlockingQueue;
@@ -0,0 +0,0 @@ public final class MCUtil {
return null;