[cpp-threads] Asynchronous Function Proposal
Peter Dimov
pdimov at mmltd.net
Tue Jun 9 09:06:24 BST 2009
> Extending the lifetime of a function argument after the function returns
> relies on this property, and this is an issue that is conceptually
> orthogonal to thread locals.
>
> void f( T & t1, T t2 )
> {
> t1 = t2;
> }
>
> This extends the lifetime of t2 to that of the object t1 refers to.
Incidentally, scoped allocators are not a problem (even with thread locals).
The assignment doesn't change t1's allocator.
More information about the cpp-threads
mailing list