Boost logo

Boost Users :

From: Anthony Williams (anthony_w.geo_at_[hidden])
Date: 2008-04-09 10:24:34


Anteru <newsgroups_at_[hidden]> writes:

> Anthony Williams schrieb:
>> I'll see if I can word things better.
> Thanks!
>
>> Could you show the code for Lock and Condition? Also, does this happen on
>> Windows, a pthreads platform or both?
> Happens on Windows, not tested on pthreads. I only tested on windows as
> I have been using custom condition/threads there.

OK. I can't reproduce the problem here, but looking at the code with fresh
eyes, there might be a bug in the code that tries to avoid spurious wakes.
Here's something to try: comment out the

                 while(!woken)

on line 175 of boost/thread/win32/condition_variable.hpp

This will increase the incidence of spurious wakes, but might fix the
problem. If the problem is reproducible without the change, and this change
fixes it, then I need to investigate the new condition variable code more
thoroughly.

Anthony

-- 
Anthony Williams            | Just Software Solutions Ltd
Custom Software Development | http://www.justsoftwaresolutions.co.uk
Registered in England, Company Number 5478976.
Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net