|
Boost : |
From: Eric Woodruff (Eric.Woodruff_at_[hidden])
Date: 2002-08-09 16:10:36
Good call on the policy-based approach.
----- Original Message -----
From: Peter Dimov
Newsgroups: gmane.comp.lib.boost.devel
Sent: Friday, 2002:August:09 4:43 PM
Subject: Re: Re: Re: Threads & Exceptions
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.
_______________________________________________
Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk