This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [c++0x] std::thread fixes
- From: Chris Fairles <chris dot fairles at gmail dot com>
- To: Paolo Carlini <paolo dot carlini at oracle dot com>
- Cc: Jonathan Wakely <jwakely dot gcc at gmail dot com>, "libstdc++" <libstdc++ at gcc dot gnu dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 22 Jan 2009 13:27:07 -0500
- Subject: Re: [c++0x] std::thread fixes
- References: <4348dea50901211542p24118c39tcd0f30c37d5297b2@mail.gmail.com> <4978B384.4080207@oracle.com>
On Thu, Jan 22, 2009 at 12:57 PM, Paolo Carlini
<paolo.carlini@oracle.com> wrote:
> Jonathan Wakely wrote:
>> As discussed recently, the names in std::thread don't follow the
>> libstdc++ coding style.
>>
>> There's a memory leak in the case where a new thread can't be started,
>> because of the shared_ptr cycle created in _M_this_ptr.
>>
>> The std::thread move constructor and assignment operator definitions
>> are missing.
>>
>> _Thread_data_base doesn't need a mutex, and doesn't need to derive
>> from enable_shared_from_this.
>>
> [snip]
>
> Thanks Jon for this work. I understand it also includes changes in ABI,
> because of the mutexes, thus, even if we are talking about C++0x mode,
> it would be nice to converge as soon as possible and then do not make
> changes during 4.4.x. I'd like to hear Chris too, about std::thread...
Most of these changes were previously discussed via private email and
on the list as well. As for the ABI, I don't see the gnu.ver changes
for the __start_thread to _M_start_thread change and
_Thread_data_base rename as well. Also, should we just inline
thread.join and thread.detach to avoid having to export their names?
Not that I think the names are ever going to change but two less
things affecting the ABI seems like a good thing. Not sure about the
rules to determine whats sufficiently trivial and inline-able.
Otherwise, OK with the rest.
Chris