Is it possible for a thread to Deadlock itself?

后端 未结 20 1385
暗喜
暗喜 2020-12-02 09:29

Is it technically possible for a thread in Java to deadlock itself?

I was asked this at an interview a while back and responded that it wasn\'t possible but the inte

20条回答
  •  心在旅途
    2020-12-02 09:50

    Maybe what the interviewer was thinking of was:

    Thread.currentThread().join();
    

    However I would argue that it does not count as a deadlock.

提交回复
热议问题