【发布时间】:2021-10-06 16:38:22
【问题描述】:
我已经配置了 1 个线程池 @Async(value="pool_1")。现在我想在不同的类中使用这个线程池,所以我把 @Async(value="pool_1") 放在我的 2 个不同的类之上。我只想得到确认,因为它不会创建 2 个单独的线程池。 就像我将池大小设置为 500 个线程,将相同的异步放在 2 个不同的类上,不会将池大小设置为 1000 对吗? 这些线程也将是SHARED,而不是划分在两个类之间
【问题讨论】:
标签: spring-boot spring-annotations completable-future threadpoolexecutor spring-async