Boost logo

Boost Users :

From: Nat Goodspeed (ngoodspeed_at_[hidden])
Date: 2007-03-01 17:18:38


-----Original Message-----
From: boost-users-bounces_at_[hidden]
[mailto:boost-users-bounces_at_[hidden]] On Behalf Of Frank Mori
Hess
Sent: Thursday, March 01, 2007 9:38 AM
To: boost-users_at_[hidden]
Subject: Re: [Boost-users] [signals] dropping ThreadingModel template
parameter

a problem
I'd like to address is how painful it currently is to declare a
thread-safe signal, the threading model being at the end of a long list
of
template parameters. Two possibilities come to mind. One is making
lightweight_mutex the default ThreadingModel, maybe called
"auto_threaded"
and still providing single_threaded and multi_threaded for those
determined enough to plow through all the template parameters. The
other
is providing a templated typedef class that uses a tweaked set of
defaults
for the template parameters appropriate for thread-safety. For example,

mt_signal<Signature>::type

might be a signal type using last_value<optional<R> > for the combiner
and
signals::multi_threaded for the ThreadingModel.

[Nat] You might also consider defining traits to allow a determined
consumer to override your defaults?


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