Cleanup all threads (e.g. AsyncTimeout.Watchdog) on explicit shutdown
See original GitHub issueCurrently i use this
OkHttpClient client0 = ???
client0.dispatcher.executorService.shutdown
client0.connectionPool.evictAll
client0.cache.close
but this is not enough since okhttp3.ConnectionPool#executor remains running this is an issue because it prevents garbage collection of classloader which loaded okhttp it would be nice to have a single close method which closes all connections and stops all threads started by okhttp tested on 3.11.0
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:11
Top Results From Across the Web
Java Poller Thread cleanup before JVM shutdown
For example if the application is based on a JFrame then add a windowClosing() hook to gracefully stop the running Thread s and...
Read more >How to use the SAPControl Web Service Interface
Shutdown triggers a soft shutdown via SIGQUIT. RestartInstance triggers an instance restart. All functions work asynchronously, which means they trigger the ...
Read more >IBM Spectrum Scale 5.1.0: Problem Determination Guide
Example mmpmon scenarios and how to analyze and interpret their results. ... gpfs_wt_count_all : Count of all threads with waiting time greater than...
Read more >Graceful Shutdown and Cleanup - The Rust Programming ...
Let's start with implementing Drop on our thread pool. When the pool is dropped, our threads should all join to make sure they...
Read more >4913 – org.apache.log4j.helpers.FileWatchdog should allow ...
So I added a method, that shutdown all FileWatchDog threads, callable from: PropertyConfigurator.shutdown(). For me this works, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@OlegYch fair point.
BTW this it isn’t a high priority at the moment, but if you follow the steps above, we should try to shutdown threads etc so we are good citizens in containers (build systems or web servers etc)
fair enough