Boost logo

Boost Users :

From: Timmo Stange (ts_at_[hidden])
Date: 2007-02-09 04:16:24


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()).

Regards

Timmo Stange


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