mirror of
https://gitee.com/san-bing/JChargePointProtocol
synced 2026-07-13 02:07:58 +08:00
消费处理线程池更换为虚拟线程
This commit is contained in:
@@ -31,7 +31,7 @@ public abstract class AbstractConsumerService extends JCPPApplicationEventListen
|
|||||||
protected ScheduledExecutorService scheduler;
|
protected ScheduledExecutorService scheduler;
|
||||||
|
|
||||||
public void init(String prefix) {
|
public void init(String prefix) {
|
||||||
this.consumersExecutor = Executors.newCachedThreadPool(JCPPThreadFactory.forName(prefix + "-consumer"));
|
this.consumersExecutor = JCPPExecutors.newVirtualThreadPool(prefix + "-consumer-virtual");
|
||||||
this.mgmtExecutor = JCPPExecutors.newWorkStealingPool(getMgmtThreadPoolSize(), prefix + "-mgmt");
|
this.mgmtExecutor = JCPPExecutors.newWorkStealingPool(getMgmtThreadPoolSize(), prefix + "-mgmt");
|
||||||
this.scheduler = Executors.newSingleThreadScheduledExecutor(JCPPThreadFactory.forName(prefix + "-consumer-scheduler"));
|
this.scheduler = Executors.newSingleThreadScheduledExecutor(JCPPThreadFactory.forName(prefix + "-consumer-scheduler"));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user