dongpodu commented on issue #2244:
URL:
https://github.com/apache/incubator-hugegraph/issues/2244#issuecomment-1674171216
现在解决了,使用的是自定义线程池:
private static ExecutorService pool = new
ThreadPoolExecutor(100,128,0L,TimeUnit.MILLISECONDS,new
LinkedBlockingQueue<>(),new NamedThreadFactory("custom-thread", true));
CompletableFuture.runAsync(()->{执行的方法},pool);
这个线程池的maxSize和coreSize是一样大的,这样就可以保证线程不会被销毁。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]