This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Threads and Synchronization and the fly likes Thread stopped working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "Thread stopped working" Watch "Thread stopped working" New topic
Author

Thread stopped working

srikrishna mandala
Greenhorn

Joined: Nov 02, 2010
Posts: 1

I wrote a Thread class, for which there will be a run() method.
In that run(), I added a while(true) loop.

While executing the thread, it started fine.
run() method is running fine and is printing some messages (messages which I wrote in System.out.println() )

All of a sudden, my thread stopped working.
I did not get any exception when the thread stopped working.

Can I know what could be the possible reasons for my thread not to work?

When I restart the program, it worked fine.

Thanks in advance.
Stephan van Hulst
Bartender

Joined: Sep 20, 2010
Posts: 3893
    
  18

Sounds like a deadlock, or starvation or something. You'll have to post your code, otherwise we can't help you.

Oh, and please UseCodeTags!


The mind is a strange and wonderful thing. I'm not sure that it will ever be able to figure itself out, everything else, maybe. From the atom to the universe, everything, except itself.
 
 
subject: Thread stopped working
 
It's not a secret anymore!