Boost logo

Boost :

Subject: Re: [boost] [thread] patch to allow custom stack size.
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2011-12-02 12:57:40

Le 02/12/11 17:54, Geoff Shapiro a écrit :
> Vicente Botet<vicente.botet<at>> writes:
>> Geoff Shapiro wrote
>>> 2. It might be a good thing to be able to specify a default attribute set
>>> to be
>>> used in a constructor version not taking an attribute object reference
>>> (this is
>>> the current constructor).
>> The current constructor uses the default native attributes. Is this what you
>> mean?
> Not quite. I was bringing up the idea that a code implementation could instance
> a thread_attributes object and set it as a default attribute bundle. The current
> constructor would use this default set of attributes, if set, rather than rely
> upon the default native attributes.
IIUC, I suspect that this will introduce a singleton with thread-safe
issues, that I will prefer to avoid. I guest that you could always wrap
the Boost.thread call to get the behavior you desire.
> For me, the utility of having this is
> multiple: backward compatibility for a large code base already using the legacy
> constructor for threads, asserting a uniform default policy that is easily
> modified across all threads, not having to cope with differences in the default
> native behaviors in different environments, etc.
Of which legacy constructors of threads are you talking about?


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