Producer/Consumer threads using a Queue
问题 I\'d like to create some sort of Producer/Consumer threading app. But I\'m not sure what the best way to implement a queue between the two. So I\'ve some up with two ideas (both of which could be entirely wrong). I would like to know which would be better and if they both suck then what would be the best way to implement the queue. It\'s mainly my implementation of the queue in these examples that I\'m concerned about. I\'m extending a Queue class that is an in house class and is thread safe.