用CommonPool替代compleatable,避免大量异步同时执行

This commit is contained in:
wuweifeng10 2020-08-03 20:42:33 +08:00
parent 52ab114940
commit 6a77b0976d

View File

@ -71,7 +71,7 @@ public class Async {
groupCallback = new DefaultGroupCallback(); groupCallback = new DefaultGroupCallback();
} }
IGroupCallback finalGroupCallback = groupCallback; IGroupCallback finalGroupCallback = groupCallback;
CompletableFuture.runAsync(() -> { COMMON_POOL.submit(() -> {
try { try {
boolean success = beginWork(timeout, COMMON_POOL, workerWrapper); boolean success = beginWork(timeout, COMMON_POOL, workerWrapper);
if (success) { if (success) {