Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2007-03-26 15:04:52


Howard Hinnant wrote:

> I was specifically trying to indicate a simplified (and safer)
> interface.

[...]

> Do we want such sharing *implicitly*? By default? In the
> *foundation* class?

I don't know if you remember it, but a while ago I tried to convince you
that an N2178 handle is conceptually a lower level primitive than an N2184
thread.

This is extremely hard to sell to someone who has the implementations of
both before his eyes and can plainly see that implementation-wise,
N2184::thread is closer to pthread_t than N2178::handle.

But if you consider both on an abstract level, it's easier to accept. An
N2184 thread can be built on top of an N2178::handle by just wrapping it and
disabling copyability. And an N2178::handle is obviously more powerful and
more unsafe, as opposed to N2184::thread which is simplified and safer.

I have absolutely no problems with the idea that the default and recommended
primitive needs to be N2184::thread (minus cancelation_requested plus thread
safety)... as long as we also deliver a powerful interface for the power
users.


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