Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-08-08 06:10:04

From: "Dale Peakall" <dale.peakall_at_[hidden]>
> On Wednesday 07 August 2002 4:54 pm, you wrote:
> > I think so. Which is only evidence that the logic applied isn't
> > necessarily the logic that everyone would apply, and thus the premise
> > thread<void> would indicate nothrow semantics) is shaky at best.
> I have to agree with Bill here. It just doesn't fit in my view of "common
> sense" which means that as I'm clearly not alone it can't be considered as
> entirely "obvious" semantics. To be honest, it looks, smells and feels
> a hack :-)

I am not claiming that it is "obvious". I said that it is "logical", in the
sense that when you see the explanation, you smile and think "So there _is_
some twisted logic in that!" :-)

> If you don't want your worker threads to cause your application to
> on unexpected exceptions catch(...) and add whatever logic is appropriate
> your application.

No, I don't want my application to terminate on _expected_ exceptions thrown
by the worker threads.

double f(double x);

double r;

    r = f(1.0) + f(2.0) + f(3.0);
// ...

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));

    r = tf1.join() + tf2.join() + tf3.join();
// ...

Boost list run by bdawes at, gregod at, cpdaniel at, john at