We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 718b9ee commit 76fdb96Copy full SHA for 76fdb96
1 file changed
src/main/java/in/koreatech/koin/global/config/AsyncConfig.java
@@ -1,5 +1,7 @@
1
package in.koreatech.koin.global.config;
2
3
+import static java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy;
4
+
5
import java.util.concurrent.Executor;
6
7
import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler;
@@ -22,6 +24,7 @@ public Executor getAsyncExecutor() {
22
24
executor.setMaxPoolSize(5);
23
25
executor.setQueueCapacity(20);
26
executor.setThreadNamePrefix("AsyncExecutor-");
27
+ executor.setRejectedExecutionHandler(new CallerRunsPolicy());
28
executor.initialize();
29
return executor;
30
}
0 commit comments