摘要: 不推荐使用suspend、stop、resume。以suspend为例,调用后,线程不会释放已占有的资源(比如锁),而是占着资源进入睡眠状态,这样容易引起死锁问题。stop方法在结束时,不能保证线程资源的正常释放。 volatile和synchronized volatile变量能保证一个线程对改变 阅读全文
posted @ 2017-03-02 19:04 idea偶买噶 阅读(90) 评论(0) 推荐(0)
摘要: The key and value classes have to be serializable by the framework and hence need to implement the Writable interface. Additionally, the key classes h 阅读全文
posted @ 2017-03-02 14:43 idea偶买噶 阅读(100) 评论(0) 推荐(0)