
Anteru
Anthony Williams schrieb:
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.
With the line, I can reproduce it, although not always (maybe 2 out of 3 runs show it). Without the line, I had 15+ runs without any problem (with heavily varying system load, from totally idle to fully loaded, debug and release tested). Either your fix reduces the probability of the error dramatically or it even fixes it ;)
If there is something more I can test, let me know. Thanks,
I found a usage pattern that triggers the bug, and added a test to trunk. I've also added a "proper" fix to trunk: the simple fix above would yield many spurious wakes. I'd be grateful if you could try the version of boost.thread from svn trunk. 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