multithreading - java thread terminating early and suspiciously -


I have the following code in a runanle that passes to a thread:

  Public Zero Run () {logger.debug ("Starting thread" + Thread curentthread ()); Try {doStuff (); } Hold (exception e) {logger.debug ("exception in thread" + thread currentThread ()); } Logger.debug ("end of thread" + thread .wrenchtrade ()); }  

I have killed a bug where I look at deadlock with the following conditions

  • Only the beginning of thread messages has been printed from my message
  • A thread dump shows that Thread T (it is considered to be executing) is no longer running

Is it a magical way to do this? Can the thread end immediately without any logging or ending thread message or throw an exception?

Are you sure doStuff () a error < / Code> Not thrown? Change Hold (Exception e) to to (Connection T) . It is possible to kill thread in Java with thread.stop () , but this is not very likely.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -