Boost logo

Boost Users :

Subject: Re: [Boost-users] [Signals] trackable detection for user defined callabcks
From: Frank Mori Hess (fmhess_at_[hidden])
Date: 2011-10-28 21:49:22


On Friday, October 28, 2011, Szymon Gatner wrote:
> Additionally, within specific sub-systems
> signal-slot connections are single-threaded and using:
>
> namespace bs2 = boost::signals2;
> using bs2::keywords;
> bs2::signal_type<void (int), mutex_type<bs2::dummy_mutex> >::type sig;
>
> instead of:
>
> signal<void(int)> sig;
>
> especially multiple times in single class definition is just horrible.
> Or am I missing some easy way to redefine default mutex?

Would it work to define your own signal metafunction, that sets the template
parameters to defaults you like and only takes a Signature template?
Example attached.






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