We have a junit test runner, timeout if one test hangs. Now I want to dump the stream through the API.
I know that I can request stacktraces through Thread.getAllStackTraces (). But a dump of the stream on the console includes much more information, such as a monitor that is waiting for the stream.
Is there an API to request a monitor on which a thread is waiting?
source share