thread 在进入 timed_waiting 或 waiting之前是不是要释放它拥有的所有lock?# Java - 爪哇娇娃S*t2012-05-10 07:051 楼几年前闲下来,画的水彩,貌似颜色有点失真,真实的颜色要深些。
q*q2012-05-10 07:052 楼如题。比如一个thread用sleep进入timed_waiting或用wait,join进入waiting state之前,它是不是要释放它所拥有的所有lock?谢谢。
r*l2012-05-10 07:054 楼Method wait() is associated with one object. Calling this method will causethe thread to surrender the lock of that object.【在 q**q 的大作中提到】: 如题。比如一个thread用sleep进入timed_waiting或用wait,join进入waiting state之: 前,它是不是要释放它所拥有的所有lock?: 谢谢。
q*q2012-05-10 07:056 楼Thanks. What about sleep? Suppose the sleep method is invoked inside asynchronized statementcause【在 r*****l 的大作中提到】: Method wait() is associated with one object. Calling this method will cause: the thread to surrender the lock of that object.
r*l2012-05-10 07:058 楼http://docs.oracle.com/javase/6/docs/api/One comment on that page for sleep():"The thread does not lose ownership of any monitors."【在 q**q 的大作中提到】: Thanks. What about sleep? Suppose the sleep method is invoked inside a: synchronized statement: : cause
q*q2012-05-10 07:0510 楼Thank you very much! I didn't notice this.【在 r*****l 的大作中提到】: http://docs.oracle.com/javase/6/docs/api/: One comment on that page for sleep():: "The thread does not lose ownership of any monitors."
b*y2012-05-10 07:0516 楼嗯~我们每个人身上都背负了3000年的历史(也许不止3000年)……但具体到个人,家传影响很大很大……【在 c**********1 的大作中提到】: 我现在算知道小兔子的灵气从哪里来的了,呵呵
c*12012-05-10 07:0518 楼有遗憾的人生才可以让自己有更多的想象,才能写出更好的诗和文章,快去写!!!!!我搬个阿凳来等。【在 S*******t 的大作中提到】: 最遗憾的就是没有继承爸爸的才气:(
t*r2012-05-10 07:0519 楼不错不错:-)颜色在photoshop里可以改深一些,有时候照片失真得ps调整一下的。【在 S*******t 的大作中提到】: 几年前闲下来,画的水彩,貌似颜色有点失真,真实的颜色要深些。