|
|
|
|
|
by thaumasiotes
3204 days ago
|
|
> And it's still a useful exercise for exactly why you need a thread-safe blocking queue 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? |
|
I don't know why I picked such a complicated example.
Did you ever go to the grocery store and had to wait for the people in front of you? That's also queue and yet nobody is taking numbers.