ArrayBlockingQueue 有两个条件:notFull 和 notEmpty。如何理解这两个条件?这是一种锁分裂吗?

ArrayBlockingQueue has two condition: notFull and notEmpty. How to understand these two condition? It is a kind of lock splitting?

如果是锁分裂的策略,我看到mutable manipulation: put是锁保证的

所以你说的是 source code

它们不是锁,而是信号 (Conditions)。

其中一个放置值的线程将等待 space 可用,即 notFull

其中一个读取值的线程将等待添加项目,即 notEmpty