No, it will not be deadlock:
- As soon as the manufacturer can get the lock, he quickly releases it (the impulse does not interrupt the manufacturer)
- when a consumer can get a lock, he either finds the data or waits (releases the lock), respectively
, . , PulseAll . :
, . , , , .
, , , - , - . , , (.. if(buf.Count == 1)) - , , , .