All credits go to Akshar Raaj
Note that if Queue is used, queue itself is threading safe to use because Queue encapsulates the behaviour of Condition, wait(), notify(), acquire() etc.
ref:
http://agiliq.com/blog/2013/10/producer-consumer-problem-in-python/
No comments:
Post a Comment