Sleeping barber problem
en.wikipedia.org
en.wikipedia.org
You tell your friend "come meet me near the X when you're done, and if I'm done I'll find you at the Y". He tells you "come meet me near the Y when you're done", and if I'm done I'll find you at the X."
How about knives and meat, where the non-dominant hand’s knife is used in place of a fork? That would definitely require having one utensil in each hand. Seems a bit crude-mannered for erudite philosophers, though...
The story makes sense for me if you assume that the dining philosophers aren't going to use one chopstick per hand, but they have to pick up one to the left and one to the right before they can put two in one hand.
You might as well say "actually life is not like a box of chocolates, because it cannot be purchased at candy shops and doesn't melt when you leave it on your dashboard".
The point of the analogy is to assign the described traits to the discussed concept, instead of putting the concept in the world of the analogy.
\s
This is the critical part of the analogy, and is why it breaks down. It's such an artificial contrivance to suggest that both the barber and the customer moving to the waiting room won't notice each other - yes, you can come up with theoretical ways to do it, but that's requiring contortions in order to explain what is supposed to be the main point of the analogy.
(it's already a stretch that the barber can't see the waiting clients, as per degenerate's comment above)
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.
Queues are inherently ordered, right? The take-a-number system is still a queue, it just replaces physical ordering with a paper that shows your place in line.