On Mon, Oct 30, 2017 at 9:43 AM, Roger Riggs <roger.ri...@oracle.com> wrote:
> ThreadPoolExecutor has a responsibility to cleanup any native resources it
> has allocated (threads) and it should be free to use whatever mechanism is 
> appropriate.

I wonder though whether TPE.finalize() is ever actually hit in
practice: TPE is (by definition) a thread pool, and every live thread
in that pool has (by way of TPE.Worker) a strong reference to the TPE
itself via an outer class reference which is passed around in enough
places to make me think that it would never actually be collectable in
a real-world situation, unless all core threads were allowed to time
out.

-- 
- DML

Reply via email to