[concurrency-interest] PooledExecutor question

Vitaliy Geraymovych Vitaliy Geraymovych <vitaliy.home@gmail.com>
Thu, 14 Oct 2004 15:13:47 -0400


I am still checking but it seems that
e.awaitTerminationAfterShutdown() does the trick.

Thanks,
Vitaliy


On Thu, 14 Oct 2004 12:03:04 -0700, Joe Bowbeer <jozart@blarg.net> wrote:
> Have you tried java.util.concurrent.ThreadPoolExecutor?
> 
> To shutdown a thread pool and await termination, you would:
> 
>   threadPool.shutdown();
>   threadPool.awaitTermination(timeout, timeUnit);
> 
> Same problem different class?  Or does this work for you?
> 
> 
> 
> 
> ----- Original Message -----
> From: "Vitaliy Geraymovych" <vitaliy.home@gmail.com>
> To: <concurrency-interest@altair.cs.oswego.edu>
> Sent: Thursday, October 14, 2004 7:53 AM
> Subject: [concurrency-interest] PooledExecutor question
> 
> Hi All,
> 
> I am having problems using PooledExecutor. After submitting Runnables
> into the pool I need to wait until all of them are completed. Call to
> shutdownAfterProcessingCurrentlyQueuedTasks after submitting all tasks
> doesn't seem to help.
> 
> Problem is happening when I am running JUnit . JUnit terminates before
> all tasks are completed and as the result several tasks remain
> unfinished.
> 
> Is there a way to wait until PooledExecutor finishes all tasks
> submitted into the queue?
> 
> Thanks,
> Vitaliy
> 
> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest@altair.cs.oswego.edu
> http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest
>