File tree Expand file tree Collapse file tree 3 files changed +15
-4
lines changed
main/java/oracle/kubernetes/operator
test/java/oracle/kubernetes/operator/work Expand file tree Collapse file tree 3 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 1
- // Copyright (c) 2022, 2023 , Oracle and/or its affiliates.
1
+ // Copyright (c) 2022, 2024 , Oracle and/or its affiliates.
2
2
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
3
3
4
4
package oracle .kubernetes .operator ;
@@ -249,6 +249,7 @@ void waitForDeath() {
249
249
250
250
acquireShutdownSignal ();
251
251
252
+ wrappedExecutorService .shutdown ();
252
253
stopAllWatchers ();
253
254
}
254
255
Original file line number Diff line number Diff line change 1
- // Copyright (c) 2018, 2023 , Oracle and/or its affiliates.
1
+ // Copyright (c) 2018, 2024 , Oracle and/or its affiliates.
2
2
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
3
3
4
4
package oracle .kubernetes .operator .work ;
@@ -48,7 +48,12 @@ public Engine() {
48
48
* @return executor service
49
49
*/
50
50
public static ScheduledExecutorService wrappedExecutorService (Container container ) {
51
- ScheduledThreadPoolExecutor threadPool = new ScheduledThreadPoolExecutor (DEFAULT_THREAD_COUNT );
51
+ ScheduledThreadPoolExecutor threadPool = new ScheduledThreadPoolExecutor (
52
+ DEFAULT_THREAD_COUNT , r -> {
53
+ Thread t = Executors .defaultThreadFactory ().newThread (r );
54
+ t .setDaemon (true );
55
+ return t ;
56
+ });
52
57
threadPool .setRemoveOnCancelPolicy (true );
53
58
return wrap (container , new VirtualScheduledExectuorService (threadPool ));
54
59
}
Original file line number Diff line number Diff line change 1
- // Copyright (c) 2018, 2023 , Oracle and/or its affiliates.
1
+ // Copyright (c) 2018, 2024 , Oracle and/or its affiliates.
2
2
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
3
3
4
4
package oracle .kubernetes .operator .work ;
@@ -284,6 +284,11 @@ int getNumItemsRun() {
284
284
return numItemsRun ;
285
285
}
286
286
287
+ @ Override
288
+ public void shutdown () {
289
+ // no-op
290
+ }
291
+
287
292
@ Override
288
293
@ Nonnull
289
294
public ScheduledFuture <?> schedule (
You can’t perform that action at this time.
0 commit comments