Skip to content

Commit

Permalink
Fix process can't stop when tomcat port already in use. (apache#8552)
Browse files Browse the repository at this point in the history
* make scheduledExecutors thread is daemon.

* shutdown scheduledExecutors and executorServiceRing when destroy.

* cancel shutdown.
  • Loading branch information
horizonzy authored Oct 17, 2021
1 parent 34f8fe3 commit 395a6c0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public class DefaultExecutorRepository implements ExecutorRepository, ExtensionA
public DefaultExecutorRepository() {
for (int i = 0; i < DEFAULT_SCHEDULER_SIZE; i++) {
ScheduledExecutorService scheduler = Executors.newSingleThreadScheduledExecutor(
new NamedThreadFactory("Dubbo-framework-scheduler"));
new NamedThreadFactory("Dubbo-framework-scheduler", true));
scheduledExecutors.addItem(scheduler);

executorServiceRing.addItem(new ThreadPoolExecutor(1, 1,
Expand Down

0 comments on commit 395a6c0

Please sign in to comment.