bob*_*obo 5 java blackberry synchronized-block
我看到了这个:
// thread is a member of this class
synchronized( this.thread )
{
this.thread.running = false;
this.thread.notifyAll(); // Wake up anything that was .waiting() on
// the thread
this.thread = null; // kill this thread reference.
// can you do that in a synchronized block?
}
Run Code Online (Sandbox Code Playgroud)
是否可以设置thread=nullwhile仍然保持锁定?
我在一些BB代码中找到了这个金块.
| 归档时间: |
|
| 查看次数: |
3684 次 |
| 最近记录: |