|
Threads-Devel : |
From: David Abrahams (dave_at_[hidden])
Date: 2007-02-03 22:28:19
"Felipe Magno de Almeida" <felipe.m.almeida_at_[hidden]> writes:
> On 2/3/07, David Abrahams <dave_at_[hidden]> wrote:
>> "Felipe Magno de Almeida" <felipe.m.almeida_at_[hidden]> writes:
>>
> [snipped]
>
>>
>> Yes, but if you use the SSO you can (usually) do stack allocation and
>> (on 32-bit platforms) pass the address across the thread boundary in
>> that long. Am I missing something?
>
> I think so, because the stack allocation (which is already done, but
> without any option for heap allocation) would still require
> synchronization in boost::thread constructor, since the constructor
> couldn't return before the copy happened. The heap allocation frees
> the constructor from this synchronization since we don't have any
> copies.
Of course. Silly me.
-- Dave Abrahams Boost Consulting www.boost-consulting.com