摘要: join是Thread类的方法 /** * Waits for this thread to die. * * @exception InterruptedException if any thread has interrupted * the current thread. The <i>int 阅读全文
posted @ 2018-07-26 17:51 奋斗的渣渣 阅读(713) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/felixzh/p/6036074.html 阅读全文
posted @ 2018-07-26 16:16 奋斗的渣渣 阅读(73) 评论(0) 推荐(0) 编辑
摘要: 1.wait 属性Object类 (1)首先,调用了wait()之后会引起当前线程处于等待状状态。 (2)其次,每个线程必须持有该对象的monitor。如果在当前线程中调用wait()方法之后,该线程就会释放monitor的持有对象并让自己处于等待状态。 (3)如果想唤醒一个正在等待的线程,那么需要 阅读全文
posted @ 2018-07-26 11:49 奋斗的渣渣 阅读(327) 评论(0) 推荐(0) 编辑