Похожие чаты

So you trying to use the same executor to do

tasks with each service?

2 ответов

10 просмотров

Nope, unique executor for each service

Пользователь-61653 Автор вопроса
Пользователь 61024
Nope, unique executor for each service

@Bean(name = "test1ThreadPoolTaskExecutor") @Qualifier("test1Thread") public Executor test1AsyncExecutor() { ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); executor.setCorePoolSize(1); executor.setMaxPoolSize(1); executor.setThreadNamePrefix("Test1-"); executor.initialize(); return executor; } Well this uses the same singleton Executor, the randomness is just that the Queue of Executor is filled at random times.

Похожие вопросы

Обсуждают сегодня

Карта сайта