java_代码
夕时明月
分享的过程也是自我更新的过程;进步源自点滴的积累
展开
-
用Lock Condition自主实现阻塞队列
package thread.lock_condition; import java.util.ArrayList; import java.util.List; import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.Lock; import java.util.concurrent.lock...原创 2018-07-08 16:27:49 · 1173 阅读 · 1 评论 -
用Lock Condition实现线程通信
package thread.notify; import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; /** * @ClassName: LockCondition * @Descr...原创 2018-07-08 16:45:00 · 442 阅读 · 0 评论