Tuesday 18 April 2017

Java Threads Issues

Question:
Sometimes threads are not closed or reused by the pool created by ExecutorService.newCachedThread()


Answer:
Don't Rename any of the threads after created , if you do so it will not manged/closed  by Pool . So becareful while doing Thread.currentThread().setName("NEW NAME")

No comments:

Post a Comment

Please comment here