Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
    Bookmark Topic Watch Topic
  • New Topic

Doubt with a thread question about notify() and wait() methods

 
Cheo Gomez
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi community im really stucked with these question, I dont understand why the run() method of MyThread is not called.



Thankyou very much
 
Henry Wong
author
Marshal
Pie
Posts: 21127
78
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Report post to moderator
Cheo Gomez wrote: Hi community im really stucked with these question, I dont understand why the run() method of MyThread is not called.



Thankyou very much



Hint: take a look at how your thread object is created.

 
Cheo Gomez
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Report post to moderator
Thats the problem, I dont understand how it is created, Thread t1= new MyThread(sa);

 
Henry Wong
author
Marshal
Pie
Posts: 21127
78
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Report post to moderator
Cheo Gomez wrote:Thats the problem, I dont understand how it is created, Thread t1= new MyThread(sa);



Please don't change (meaning fix) code after the discussion -- add a new post with the changes instead. The original post now has code that works, and hence, the discussion doesn't make sense.

Henry
 
Cheo Gomez
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Report post to moderator
sorry it was a typo error from me, but with the hint you gave to me, I fix the code for not creating a new topic, my apologies. Can I create a new one and delete this topic?
 
Henry Wong
author
Marshal
Pie
Posts: 21127
78
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Report post to moderator
Cheo Gomez wrote:sorry it was a typo error from me, but with the hint you gave to me, I fix the code for not creating a new topic, my apologies. Can I create a new one and delete this topic?


Don't worry about it. Glad you fixed it. Resolved and locked.

Henry
 
    Bookmark Topic Watch Topic
  • New Topic