Boost logo

Boost Users :

From: Douglas Gregor (doug.gregor_at_[hidden])
Date: 2007-02-09 10:16:12


On Feb 9, 2007, at 4:16 AM, Timmo Stange wrote:

> Frank Mori Hess wrote:
>
>> combiner_type& combiner();
>>
>> to
>>
>> void set_combiner(const combiner_type &);
>>
>> so the combiner can only be modified while holding the appropriate
>> lock?
>
> If you want to keep the interface somewhat more compatible,
> you could return a proxy which acquires the lock in its
> assignment operator. Making the other possible uses thread-
> safe is more complicated (signal.combiner().member()).

My impression is that very few users actually need to modify the
combiner in this way. I think we should stick with the "right"
interface, which probably meets having "combiner" return by-value and
adding "set_combiner".

        Cheers,
        Doug


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net