Boost logo

Boost :

From: Greg Colvin (gcolvin_at_[hidden])
Date: 2001-06-23 14:14:48


From: John Max Skaller <skaller_at_[hidden]>
> John Max Skaller wrote:
>
> > > 2) For many them what we are asking is that the standard be changed to
> > > reflect what their compilers are already doing. Their compilers are
> > > already supporting threading libraries; the idea is to standardize existing
> > > behavior, not invent a whole new set of behaviors.
> >
> > Yes.
>
> But this is only half the story. Implementations
> differ on crucial points, and it will be necessary
> to specify a particular behaviour which may render
> some of the implementations non-conforming.
>
> 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.

But your general point is well taken.

 
> This is OK too: here the committee is
> inventing behaviour -- although it is probably
> closer to choosing from several alternatives
> which are all existing practice.
>
> 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.


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