Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • Caching things yourself is often the precursor to memory leaks ... if you don't drop things out of the HashMap then whatever objects are still references by those Runnable can't be GC'd if you're still holding the HM.. Executor is orthogonal issue Commented Mar 19, 2021 at 3:06
  • 1
    what is happening for that 40minutes - if you are waiting for results there are possibly better ways than allocating a thread and waiting - see stackoverflow.com/questions/14541975/… for some examples / discussion on this. Because if you need to process 100x of those 40minute things "thread pool run-out" or even "thread run-out" is something you have to design for. Commented Mar 19, 2021 at 3:07