Boost logo

Boost :

From: Phil Endecott (spam_from_boost_dev_at_[hidden])
Date: 2007-10-31 06:47:36


Howard Hinnant wrote:
> On Oct 30, 2007, at 2:03 PM, Phil Endecott wrote:
>> Howard Hinnant wrote:
>>> Actually thread cancellation is old. Many (not all) thread API's
>>> have some form or another of cancellation. That being said, the
>>> compromise reached at the Kona meeting 4 weeks ago was to remove
>>> cancellation (or interruption) from the proposal. This removal is
>>> reflected in N2411.
>>
>> That's unfortunate. I'm a little confused about how completely
>> removing it is a "compromise"!
>>
>> This is something that I need. Does anyone know of an alternative
>> (POSIX-compatible) C++ thread library that offers cancellation? If
>> not I may try to write one.
>
> A partial workaround is to religiously use cv::timed_wait, as opposed
> to cv::wait, so that you can wake up and discover if you're supposed
> to quit every once in a while.

Hi Howard,

Maybe you'll recall a previous message of mine where I commented on the
power-efficiency implications of frequent wakeups, and the benefits of
aligning them. So no, I'm not keen on this approach.

I would like to think that a pthreads cleanup function could be written
that would have the effect of invoking destructors from the
cancellation point up to the thread entry point. Can you explain the
rationale for leaving it out?

Regards,

Phil.


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