Boost logo

Threads-Devel :

From: Felipe Magno de Almeida (felipe.m.almeida_at_[hidden])
Date: 2007-02-03 17:21:14


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.

>
> --
> Dave Abrahams
> Boost Consulting
> www.boost-consulting.com

-- 
Felipe Magno de Almeida

Threads-Devel list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk