Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-08-09 15:43:00


From: "Victor A. Wagner, Jr." <vawjr_at_[hidden]>
> >I want to be able to transform this to:
> >
> >thread<double> tf1(bind(f, 1.0));
> >thread<double> tf2(bind(f, 2.0));
> >thread<double> tf3(bind(f, 3.0));
>
> I trust that:
>
> thread<double,std_exceptions> tf1(bind(f, 1.0));
> thread<double,std_exceptions> tf2(bind(f, 2.0));
> thread<double,std_exceptions> tf3(bind(f, 3.0));
>
> would be acceptable also?

I am definitely not thrilled by the opportunity to repeat ",
std_exceptions". :-) Besides, "std_exceptions" doesn't describe the
semantics well. "propagate_exceptions" would be better.

A compromise would be

template< class R = void, class P = select_default_policy<R> > class thread;

where R = void gets "terminate_on_exception" and R != void gets
"propagate_exceptions". Then measure how often the second template argument
actually gets used in code. I can venture a guess.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk