From: David Masover Date: 2009-12-18T01:48:51+09:00 Subject: Re: Using threads to show progress On Thursday 17 December 2009 02:52:26 am Brian Candler wrote: > Piyush Ranjan wrote: > > How about using a mutex synchronize block around queue.push ? Would that > > solve the potential race conditions we are looking at here ? > > Queue is a thread-safe class, and you do not need any additional > synchronisation. Not around the queue itself, no, so you're right -- a mutex synchronize around queue.push would do nothing. No, the problem isn't the queue itself, it's if you were to pass something non-thread-safe through the queue.