Boost logo

Boost :

From: John Max Skaller (skaller_at_[hidden])
Date: 2001-06-25 14:36:47

Greg Colvin wrote:

> > For example, your document suggests that
> > if an exception tries to escape out of the function
> > used to start a thread, terminate() should be called.
> > not all implementations may do that: the ones that
> > don't may have to be changed.
> This can be handled at the level of the (new) library with
> an exception handler in the thread entry point function,
> regardless of what the underlying platform threading does.
> Which is one of the reasons that it makes sense to specify
> this behavior instead of something else.

        This may well be the case, but wasn't my point.
An alternative (it doesn't matter if you like it or not,
this is just for the sake of argument!) is that a vendor
library does something different. If we want to support
the vendor library, we may have to change the specifcation
of the core language so that the result of throwing an
exception out of the function that started the thread
(whatever that means) is unspecified.
> But your general point is well taken.

        Good. If you can explain it better, please do so!
It would be very useful for a larger body of C++ users
such as people found on boost, to understand the role
played by the abstract machine, conformance model,
and core language semantics, in making it _possible_
to provide a threading library for ISO C++.

> > There is of course a serious danger
> > standardising existing practice, since
> > existing practice is rarely that good, and rarely
> > universal.
> Indeed. But my experience is that is possible to specify
> threads such that they can be implemented on almost any
> platform.

        But it is even more obviously possible to
specify a platform independent smart pointer, and as I noted,
and I'm sure you're aware -- as the principal supplier of
proposals for smart pointers -- this doesn't mean the
committee is going reach a consensus.

        Threads are less platform independent,
and there isn't the kind of National Body pressure
to have them that existed for smart pointers.

        But I believe we should try hard,
and we may get lucky, since the committee does have some
new faces, and isn't under so much pressure to provide
other basic features. IMHO: quite a lot depends on Bjarne.
If he's against it, the chance for success is 1%.
If he's in favour, it's 50%. :-)

John (Max) Skaller, mailto:skaller_at_[hidden]
10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850
checkout Vyper
download Interscript

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