永发信息网

java中suspent()什么意思

答案:2  悬赏:0  手机版
解决时间 2021-03-17 02:08
  • 提问者网友:欺烟
  • 2021-03-16 20:05
java中suspent()什么意思
最佳答案
  • 五星知识达人网友:未来江山和你
  • 2021-03-16 20:53
Deprecated.
This method has been deprecated, as it is inherently deadlock-prone. If the target thread holds a lock on the monitor protecting a critical system resource when it is suspended, no thread can access this resource until the target thread is resumed. If the thread that would resume the target thread attempts to lock this monitor prior to calling resume, deadlock results. Such deadlocks typically manifest themselves as "frozen" processes.
简而言之suspend不释放锁,如果其他线程需要获得这个锁才能resume该线程,此时就已经死锁
全部回答
  • 1楼网友:七十二街
  • 2021-03-16 21:33
你是不是写错了 应该是线程的suspend吧?
就是挂起线程的意思,阻塞当前运行的线程的意思
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯