File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
util/src/main/java/io/kubernetes/client/informer Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -178,8 +178,17 @@ public synchronized void startAllRegisteredInformers() {
178178 });
179179 }
180180
181- /** Stop all registered informers. */
181+ /** Stop all registered informers and shut down the thread pool . */
182182 public synchronized void stopAllRegisteredInformers () {
183+ stopAllRegisteredInformers (true );
184+ }
185+
186+ /**
187+ * Stop all registered informers.
188+ *
189+ * @param shutdownThreadPool whether or not to shut down the thread pool.
190+ */
191+ public synchronized void stopAllRegisteredInformers (boolean shutdownThreadPool ) {
183192 if (MapUtils .isEmpty (informers )) {
184193 return ;
185194 }
@@ -190,6 +199,8 @@ public synchronized void stopAllRegisteredInformers() {
190199 informer .stop ();
191200 }
192201 });
193- informerExecutor .shutdown ();
202+ if (shutdownThreadPool ) {
203+ informerExecutor .shutdown ();
204+ }
194205 }
195206}
You can’t perform that action at this time.
0 commit comments