Possible language changes

Douglas C. Schmidt schmidt at dre.vanderbilt.edu
Fri Mar 4 04:13:23 GMT 2005


Hi Folks,

> (Aside: I'm not sure whether the two Dougs really agree on the
> cancellation interface either.  Java interruption is never
> asynchronous in the pthread sense.  I'm not sure whether Doug Schmidt
> really wanted that.

I've always been deeply suspicious of the POSIX async thread
cancellation mechanism since (1) it doesn't integrate well with C++
destructors and (2) it's nearly impossible for normal programmers to use
correctly (similar to RTSJ asynchronous thread cancellation, which is
too complicated for most programmers, IMHO).

> I suspect that agreeing on a thread class would also be nontrivial.)

Right, I agree.  I think the main reason to discuss thread classes in
this context is to help tease out the common use-case and requirements
that could help motivate/guide the lower-level features you folks have
been talking about.  I'm certain we won't reach full consensus on how to
actually design a thread class, though stealing liberally from what
Java's done isn't a bad starting point (though it pains me to admit it
;-)).

Take care,

     Doug






More information about the cpp-threads mailing list