|
|
|
|
|
by connorcpu
3203 days ago
|
|
Well there would have been no such thing already implemented in a standard library back in 1965 ;) And it's still a useful exercise for exactly why you need a thread-safe blocking queue, and probably shouldn't just roll your own if you don't know what you're doing. |
|
Is it? A thread-safe blocking queue sounds like one of those take-a-number systems you find in some shops. But it would be very common to instead rely on the standard waiting-customer algorithm, in which, after waiting for some period of time, the customer gets frustrated and rings the bell at the counter. Take-a-number systems are vanishingly rare by comparison. Why do you need the queue?