Producer and consumer instance == Data production additive and data destruction deleter
To avoid this problem, threaded waits should always be used in loops, such as while
Implicit Lock synchronized and display Lock can be used here
Synchronized – > Object. The wait ()/Object. The notify ()/Object. The notifyAll ()
The Lock – > Lock. NewCondition. Await () /. Signal () /. SignalAll ()
Condition is the interface that controls thread communication