I need a thread-safe queue (FIFO).
One of the methods have to be a blocking "Dequeue" (like "recv" in SOCKET).

I'm about to start this implementation, but I think it's something so common that it has to be already done...
I have googled for "thread safe queue c++ class", and I found a lot of interesting articles, but no link to actual code. Nothing in "Code Project" either.

Just not to feel silly about reinventing the wheel, I wanted to ask you codegurus: Is there really no code for this for me to use, somewhere? I see that .NET has already a nice Queue class, isn't there anything similar and thread-safe for VC++ 6.0?

Thank you!

Ricardo Vázquez.