Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

multi threading - concurrently executing two threads

 
kri shan
Ranch Hand
Posts: 1462
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the point of having two threads if one of them will have to wait until the other is done?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic