项目作者: yichunzhao

项目描述 :
creating a bounded-blocking queue using reentrant lock
高级语言: Java
项目地址: git://github.com/yichunzhao/blocking-queue-lock.git
创建时间: 2020-09-21T23:09:50Z
项目社区:https://github.com/yichunzhao/blocking-queue-lock

开源协议:

下载


Blocking-queue-lock

Blocking queue using explicit lock.

Threads are blocked when the queue is empty or reaching the max size; if putting producers and consumers in one thread pool, it shows that all threads are blocked soon, there is no thread to wake up the rest threads. The queue operations are therefore stuck.

It may have another solution, using tryLock together with a thread pool.