Getting all the threads waiting for an object before calling notifyAll

前端 未结 2 636
谎友^
谎友^ 2021-01-07 07:13

I have bunch of code & the processor is small,
when calling notifyAll, sometimes creating performance issue (100ms) so I want to know what are the threa

2条回答
  •  孤城傲影
    2021-01-07 07:44

    You can use Thread.getAllStackTraces() and print out all the threads which are waiting.

提交回复
热议问题