Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Threads
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Paul Clapham
Ron McLeod
Jeanne Boyarsky
Tim Cooke
Sheriffs:
Liutauras Vilda
paul wheaton
Henry Wong
Saloon Keepers:
Tim Moores
Tim Holloway
Stephan van Hulst
Carey Brown
Frits Walraven
Bartenders:
Piet Souris
Himai Minh
Forum:
Threads and Synchronization
Waiting for all threads to complete
Mark Miranda
Greenhorn
Posts: 24
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hello,
I have 3 threads in my program running, how can I make it so that when all 3 are done. Then will my program will print out the message "All done"?
I have been looking around, but cannot seem to find what I'm looking for.
Thanks,
Rob Spoor
Sheriff
Posts: 22650
126
I like...
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Call the join() method on all three threads. When all three methods have finished then so have all three threads.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions
How To Answer Questions
Nomaan Butt
Ranch Hand
Posts: 54
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
check the below
thread
, similar question was asked in it
https://coderanch.com/t/558517/threads/java/know-all-threads-pool-done
Mark Miranda
Greenhorn
Posts: 24
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Thanks!
There are 10 kinds of people in this world. Those that understand binary get this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Regarding FTP froma remote server
doubt from scjp book on threads
Logger question
a question on multithreading
Limit concurrent threads; report successful execution; terminating hung threads
More...