From: Peter Dimov (pdimov_at_[hidden])
Date: 2004-07-06 08:03:24
Michael Glassford wrote:
> To me, it just feels like the wrong way to be notified that a lock
> promotion failed so you have to do something else--a try_promote()
> seems much better for this. However, if people really wanted a throwing
> promote(), I'd add it.
The point is that the
scoped_write_lock wr( rd );
syntax, if supported, should never "succeed" without giving you a write
scoped_try_write_lock wr( rd );
can do that, but not scoped_write_lock.
That said, can you show an example that demonstrates how a 'try_promote' can
be used? I'm curious.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk