Boost logo

Boost :

Subject: Re: [boost] [thread] [repost] proposal to manage portable and non portable thread attributes
From: Phil Endecott (spam_from_boost_dev_at_[hidden])
Date: 2009-01-22 10:55:45

vicente.botet wrote:
> The current C++0x and Boost.Thread allows to get native_handle_type of a thread and
> a mutex but don't allows to set the non portable atributes at the creation, in
> particular for the thread attributes.

Yes. In particular you can't specify the stack size, and there is no
way to change this after creation once the native_handle is available.
See this thread:

Although I can't find it now, I recall also reading a message from
Howard Hinnant where he said that this had been put to the standards
committee but had not got anywhere. I think Howard was suggesting that
other "interested parties" should put together a proposal in the hope
that they would have more luck (but this is a while ago now so I may
not be remembering right). To me, since I had other problems with the
std::thread proposal (i.e. their choice of cancellation semantics [*]),
and because I only care about POSIX, it was simplest just to write my
own thread class.

[*] If there's anyone else using glibc's pthread cancellation and C++
destructors I would always be interested to talk....


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