My reading of the source code is that get
obtains a read lock, which is independent of of the lock (called _notempty
) acquired by put
. If I understand correctly, concurrent get
s can block each other, and concurrent put
s can block each other (modulo your use of the block
parameter), but that gets and puts do not mutually block.
↧
Answer by Jonathan Feinberg for python multi-processing queue: is putting independent from getting?
↧