|
Threads-Devel : |
From: Russell Kliese (russell_at_[hidden])
Date: 2007-04-07 07:28:39
Hi,
I've been working on a project that used the boost timed read write
mutex. I recently upgraded from Debian Sarge to Etch and discovered that
these are no longer available (and found out that this was because of
the dead-lock problems).
I decided to come up with my own implementation of a timed read write
mutex that makes use of the other boost mutex types. I have decided to
share this implementation with the boost community in case it might
provide inspiration. I'm not an expert on the subject of mutexes, so
there may be flaws in my implementation --- I'm happy for any feedback.
Please note that this implementation provides only a subset of what the
old boost timed read write mutex provided (I only needed read locks that
can be promoted to write locks, with writer priority) and also operates
quite a bit differently (throws exceptions when a lock isn't obtained,
different way of promoting a read lock etc.). Also, my testing has been
less than comprehensive.
Cheers,
Russell Kliese