Boost logo

Boost :

From: Matt Hurd (matt.hurd_at_[hidden])
Date: 2005-08-22 17:39:46


>On 23/08/05, Teemu Torma <teemu_at_[hidden]> wrote:
> > On Monday 22 August 2005 03:59, Matt Hurd wrote:
> > I'm using 1.33. Is this a known bug or am I using the read_write
> > stuff incorrectly?
>
> I noticed same thing last week--a multithreaded program deadlocks with
> multiple threads waiting for write lock but no one holding it. It was
> not immediately clear to me why.
>
> This was reproduced on win32, linux and solaris, so it appears to be
> read_write_lock specific problem. Underlying primitives (mutex and
> condition) work fine on all platforms.
>
> The same code worked fine with boost 1.32.
>
> Teemu

Thanks for the confirmation Teemu.

Perhaps boost would be better off with a simpler but similar approach
totally rewritten to use posix on all platforms including win32.
Posix is viable on Mac these days I assume too. Support would be
easier I'd think. I'd be prepared to put an initial cut together. At
least Alexander Terekhov would be happy ;-) There is a certain
attractiveness is making posix do the heavy lifting...

A 90% solution that covers basic atomic ops, simple fencing and mutex
/ lock implementations better suited to policy implementations
wouldn't be too hard.

I guess at a minimum tests should detect if multithreaded apps
correctly fail when not protected so that the efficacy of other
concurrency testing is known. I use this approach in my testing where
it warns if unprotected concurrency works where it should fail.

matt.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk