commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David J. M. Karlsen" <>
Subject Question on Threadpool
Date Wed, 19 Nov 2003 02:09:38 GMT

I use DefaultThreadpool to dispatch work to in a standalone java-app. 
The problem is that the application never terminates, even  after all my 
worker threads I added to Threadpool terminate (exit their run() methods).

Why doesn't threadpool stop to run() when it's queue is empty?

Also I do not understand the DefaultThreadPool(int size) constructor:
it calls startThread size times. startThread then does:

   Thread thread = new Thread( this );
         return thread;

so the DefaultThreadPool replaces it's Thread object size times - what's 
the point in that?

what am I missing out on?

David J. M. Karlsen - +47 90 68 22 43

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message