producer-consumer

Multi-producer/multi-consumer SEH-based queue

Here is my multi-producer/single-consumer queue:
http://groups.google.ru/group/lock-free/browse_frm/thread/55df71b87acb8201
The interesting part of the algorithm is an XCHG-based producer part.

As Chris Thomasson correctly noted, the XCHG-based producer part can be combined with the well-known CAS-based consumer part in order to get multi-producer/multi-consumer (MPMC) queue:
Assine o producer-consumer