From: Hugh Sasse Staff Elec Eng Date: 2002-09-24T00:27:22+09:00 Subject: Re: Avoiding busy waiting On Sun, 22 Sep 2002, Harry Ohlsen wrote: > My original thought was to use a ConditionVariable. Ie, when the consumer > thread finds that the length of the queue is currently zero it then does a > wait on a ConditionVariable, using the mutex that's guarding the queue. The solution I saw in Concurrent Programming C. R. Snow Cambridge University Press, 1992 ISBN: 0521327962 used two condition variables, basically: read_to_read, and read_to_write. I've seen it elsewhere too. > Thanks in advance, > > Harry O. > Hugh >