Is there a default timeout for threads waiting for a synchronized method in Java? Some threads in my application do not terminate as expected. Is there anyway to check if threads died as a result of timeouts?
JLS does not specify a timeout for partitions synchronized. He just mentions
synchronized
While the execution thread owns the lock, no other thread can get the lock.
You can set a timeout in the join () method to make sure you are not waiting forever.
java.util.concurrent, , , .
"Java Concurrency In Practice". ( ).
, , (, , "" ), - . , ?
Java . ( ), , , ( System.err).
, . JVM , .
Linux, kill -QUIT <pid> Windows, Ctrl + Break . , VisualVM, StackTrace .
kill -QUIT <pid>
Ctrl + Break
I suggest you use kill -3 to see the dump of the thread, and then see what the problem threads are.
Source: https://habr.com/ru/post/1736890/More articles:UI Control Library for .NET Micro Framework - c #Focus on input field with value - javascriptWhat is the best service / tool for posting short audio clips on a website so that users can click and listen right away? - audioneed help with jquery selector - javascriptHow can I display a PPT file in a Java applet? - javaThe default values โโof parameters for native functions in jquery - functionHow to get * .cer file to add self-signed HTTPS certificate as reliable for Java - javaexcel function to get the value of another cell - excelUsing jQuery to parse RSS feeds having firefox and chrome issues - jqueryPyYAML parsed into an arbitrary object - pythonAll Articles