How to manage the default Java SwingWorker thread pool?
- by Guy Lancaster
I've got an application that uses 2 long-running SwingWorker tasks and I've just encountered a couple of Windows computers with updated JVMs that only start one of the them. There are no errors indicated so I have to assume that the default thread pool has only a single thread and therefore the second SwingWorker object is getting queued when I try to execute it.
So, (1) how do I check check how many threads are available in the default SwingWorker thread pool, and (2) how do I add threads if I'm going to need more?
Anything else that I should know? This apparent single-thread thread-pool situation goes against all of my expectations.
I'm setting up a ThreadPoolExecutor but this seems so wrong...