This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Threads and Synchronization and the fly likes multi threading - concurrently executing two threads Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "multi threading - concurrently executing two threads" Watch "multi threading - concurrently executing two threads" New topic
Author

multi threading - concurrently executing two threads

kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1376
I want to execute two threads concurrently using multi-threading. Can i just use synchronized (or) synchronized with wait() - when the first thread executes, second thread should wait until first thread finishes its execution?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42030
    
  64
What is the point of having two threads if one of them will have to wait until the other is done?


Ping & DNS - my free Android networking tools app
 
GeeCON Prague 2014
 
subject: multi threading - concurrently executing two threads