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.
22// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
33
44package oracle .kubernetes .operator ;
@@ -249,6 +249,7 @@ void waitForDeath() {
249249
250250 acquireShutdownSignal ();
251251
252+ wrappedExecutorService .shutdown ();
252253 stopAllWatchers ();
253254 }
254255
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.
22// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
33
44package oracle .kubernetes .operator .work ;
@@ -48,7 +48,12 @@ public Engine() {
4848 * @return executor service
4949 */
5050 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+ });
5257 threadPool .setRemoveOnCancelPolicy (true );
5358 return wrap (container , new VirtualScheduledExectuorService (threadPool ));
5459 }
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.
22// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
33
44package oracle .kubernetes .operator .work ;
@@ -284,6 +284,11 @@ int getNumItemsRun() {
284284 return numItemsRun ;
285285 }
286286
287+ @ Override
288+ public void shutdown () {
289+ // no-op
290+ }
291+
287292 @ Override
288293 @ Nonnull
289294 public ScheduledFuture <?> schedule (
You can’t perform that action at this time.
0 commit comments