logo       

How do I wait for the thread from the ThreadPool to finish?: msg#00033

java.jsr.166-concurrency

Subject: How do I wait for the thread from the ThreadPool to finish?

 

Hi.

 

I am trying to use the PooledExecutor to create a thread pool. Once I create my runnable task that needs to be executed, how does the calling thread wait for the thread in the pool to finish, especially since I do not have the handle to the thread that is executing the task.

 

threadPool.execute(task);

// At this point the calling thread needs to wait for the task to complete.

 

 

I am quite new to this Library and would appreciate your help.

Thanks

MH

_______________________________________________
Concurrency-interest mailing list
Concurrency-interest@xxxxxxxxxxxxxxxxxxxx
http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise