Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Concurrent processing by threads.

 
yamini nadella
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,
I am trying to implement concurrence processing in java by threads.
From a main process I want to start 2 child processes. Then main process has to wait until all of its child processes got completed. Here 2 child processes can run parallel.
So how can I stop main thread until all children execution get completed.
Thanks in advance,
Yamini.
 
Corey McGlone
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out the Join method of the Thread class.
Corey
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic