framework icon indicating copy to clipboard operation
framework copied to clipboard

Scheduler leaking thread pools

Open baffles opened this issue 9 years ago • 0 comments

It seems that the interaction between LiftSession and Schedule is causing thread pools to leak at shutdown time. I've been seeing this at shutdown time with Tomcat; Schedule.shutdown seems to be called when the servlet is destroyed, but shutDownAllSessions for LiftSession is running asynchronously somewhere else. The way Schedule is implemented, it looks like its backing threadpool is re-created in this case, but then nothing is responsible for shutting it down again. In the best case, this causes the pool to be leaked, in the worst case, it prevents Tomcat (and probably other containers) from shutting down gracefully, since they're not daemon threads.

I brought this up on the mailing list, and it sounds like it is indeed a bug, though I'm skeptical that the proposed solution on the mailing list will be adequate (as I mentioned in that thread).

baffles avatar Jul 14 '15 14:07 baffles