|
Boost : |
From: Douglas Gregor (gregod_at_[hidden])
Date: 2003-07-14 00:40:51
> Ok, enough of the review. Assuming that rw_lock is destined for
> release, I propose that whether you want to lock for reading, or for
> writing, is usually a decision made at compile time, and that this fact
> can be made to slightly simplify the scoped_lock interface, and make it
> slightly more efficient. So as a minor twist to the interface, I
> propose:
>
> class rw_mutex
> {
> public:
> typedef detail::read_lock<rw_mutex> read_lock;
> typedef detail::write_lock<rw_mutex> write_lock;
> ...
> };
I too would prefer this interface, because I feel it is much cleaner. I
*hate* enums and constants, btw :)
Doug
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk