Deadlock detection in Java

后端 未结 16 1071
野的像风
野的像风 2020-11-28 20:21

Long time ago, I saved a sentence from a Java reference book: \"Java has no mechanism to handle deadlock. it won\'t even know deadlock occurred.\" (Head First Java 2nd E

16条回答
  •  日久生厌
    2020-11-28 21:08

    Not exactly what you asked, but when a deadlock does occur, you can do a "kill -3" on the process id and it dumps a thread dump to stdout. Also, the 1.6 jvm has some tools to do the same thing in a gui manner.

提交回复
热议问题