For heavy lifting a thread pool shared across the JVM would guard against excessive threading. In order to avoid deadlock due to recursive calls, Threads created by the pool could be wrapped in class MarkedThread extends Thread {}; when a new Thread is requested, the pool checks for Thread.currentThread() instanceof MarkedThread.
For heavy lifting a thread pool shared across the JVM would guard against excessive threading. In order to avoid deadlock due to recursive calls, Threads created by the pool could be wrapped in
class MarkedThread extends Thread {}
; when a new Thread is requested, the pool checks forThread.currentThread() instanceof MarkedThread
.