Is putting an object in a multi-processing queue independent from getting an object from it?
In other words, will putting an object block the process P1 if another process P2 is getting from it?
Update: I am assuming an infinite queue.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
My reading of the source code is that
getobtains a read lock, which is independent of of the lock (called_notempty) acquired byput. If I understand correctly, concurrentgets can block each other, and concurrentputs can block each other (modulo your use of theblockparameter), but that gets and puts do not mutually block.