A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Threads and Synchronization
Thread B has to start after completion of 5 instances of Thread A
Joined: Jun 16, 2006
Sep 29, 2009 17:17:41
I have 5 instances of Thread A running.
after these 5 threads get complete, i want to start an instance of thread b. may i know how to implement this.
Author and ninkuma
Joined: Jan 10, 2002
Sep 29, 2009 17:29:33
Please be sure to take the time to compose descriptive subjects for your posts;
for more information.
A title such as "need a soluton" is not helpful. What would happen if all posts had such a title?
Please go back and change your post to add a more meaningful subject by clicking the
button on your post.
Asking smart questions
Books by Bear
Joined: Feb 23, 2009
Sep 29, 2009 17:43:07
You could write a multiple thread executor that fires an event once it's done.
An easy to use, light-weight JDBC framework
Joined: Jun 21, 2008
Sep 30, 2009 11:22:40
You could use
to make one thread wait for completion of other threads:
It is sorta covered in the
JavaRanch Style Guide
subject: Thread B has to start after completion of 5 instances of Thread A
Thread Sleeping problem
Passed SCJP 1.4 98%
threads in java
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013