Moving ThreadPoolExecutor from finalization to Cleaner

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Moving ThreadPoolExecutor from finalization to Cleaner

Roman Leventov
Finalizable objects on the heap affect garbage collection negatively. ThreadPoolExecutor is always used by some programmers instead of new Thread().start(), via Executors.newSingleThreadExecutor(). I would not be surprised if some applications create thousands of ThreadPoolExecutors. So making ThreadPoolExecutor to use Cleaner instead of finalization should be helpful.

_______________________________________________
Concurrency-interest mailing list
[hidden email]
http://cs.oswego.edu/mailman/listinfo/concurrency-interest