Subj : Re: Is there a deadlock or race condition here? To : comp.programming.threads From : Loic Domaigne Date : Thu Apr 14 2005 10:20 pm Hello, I'm definitively not an expert in that sort of things, but shouldn't the len variable in > while(len == 0) > produce.wait(); be read atomatically, with possibly a memory barrier before? Cheers, Loic. .