File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
spring-cloud-commons/src/main/java/org/springframework/cloud/commons/util Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2012-2020 the original author or authors.
2
+ * Copyright 2012-2024 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
35
35
36
36
/**
37
37
* @author Spencer Gibb
38
+ * @author Sergey Tsypanov
38
39
*/
39
40
public class InetUtils implements Closeable {
40
41
41
- // TODO: maybe shutdown the thread pool if it isn't being used?
42
42
private final ExecutorService executorService ;
43
43
44
44
private final InetUtilsProperties properties ;
@@ -47,7 +47,7 @@ public class InetUtils implements Closeable {
47
47
48
48
public InetUtils (final InetUtilsProperties properties ) {
49
49
this .properties = properties ;
50
- this .executorService = Executors .newSingleThreadExecutor (r -> {
50
+ this .executorService = Executors .newCachedThreadPool (r -> {
51
51
Thread thread = new Thread (r );
52
52
thread .setName (InetUtilsProperties .PREFIX );
53
53
thread .setDaemon (true );
You can’t perform that action at this time.
0 commit comments