This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [c++0x] std::thread fixes
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- Cc: "libstdc++" <libstdc++ at gcc dot gnu dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 22 Jan 2009 10:34:25 -0800
- Subject: Re: [c++0x] std::thread fixes
- References: <4348dea50901211542p24118c39tcd0f30c37d5297b2@mail.gmail.com>
Can we break this patch down into a couple patches, and move a bit more
incrementally?
> As discussed recently, the names in std::thread don't follow the
> libstdc++ coding style.
Whoops, I missed this. Please don't change
- class __thread_data_base;
+ class _Thread_data_base;
There is no need to do this.
Your member function changes to _M_ are fine.
> 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.
Next patch.
> The std::thread move constructor and assignment operator definitions
> are missing.
Add these in with the renames.
> _Thread_data_base doesn't need a mutex, and doesn't need to derive
> from enable_shared_from_this.
Next patch.
I'd like to separate out the renames/adding missing bits from the other
changes.
thanks,
benjamin