How to manage the default Java SwingWorker thread pool?
Posted
by Guy Lancaster
on Stack Overflow
See other posts from Stack Overflow
or by Guy Lancaster
Published on 2010-05-03T17:43:38Z
Indexed on
2010/05/03
17:48 UTC
Read the original article
Hit count: 417
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...
© Stack Overflow or respective owner