aspose file tools*
The moose likes Java in General and the fly likes Doubt with a thread question about notify() and wait() methods Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply locked New topic
Author

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

Cheo Gomez
Greenhorn

Joined: Jan 24, 2012
Posts: 25
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
Sheriff

Joined: Sep 28, 2004
Posts: 18716
    
  40

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.


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Cheo Gomez
Greenhorn

Joined: Jan 24, 2012
Posts: 25
Thats the problem, I dont understand how it is created, Thread t1= new MyThread(sa);

Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18716
    
  40

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

Joined: Jan 24, 2012
Posts: 25
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
Sheriff

Joined: Sep 28, 2004
Posts: 18716
    
  40

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Doubt with a thread question about notify() and wait() methods