Boost C++ Libraries: Ticket #11796: Thread move assignment operator, does not detach previous thread data https://svn.boost.org/trac10/ticket/11796 <p> In thread V2, thread dtor releases thread data, but move assignment operator won't release current threads data before pointing to others data.<br /> I've attached a sample program which reproduces this problem. <br /> (Tested on Ubuntu 15.10 with gcc 5.2.1) </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11796 Trac 1.4.3 saboorian@… Mon, 16 Nov 2015 06:00:35 GMT attachment set https://svn.boost.org/trac10/ticket/11796 https://svn.boost.org/trac10/ticket/11796 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">thread.cpp</span> </li> </ul> Ticket viboes Mon, 16 Nov 2015 21:56:15 GMT owner, status changed https://svn.boost.org/trac10/ticket/11796#comment:1 https://svn.boost.org/trac10/ticket/11796#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Anthony Williams</span> to <span class="trac-author">viboes</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> Ticket viboes Mon, 16 Nov 2015 22:03:42 GMT <link>https://svn.boost.org/trac10/ticket/11796#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11796#comment:2</guid> <description> <p> By V2, do you mean that if you add -DBOOST_THREAD_VERSION=3, the issue is not present? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Mon, 16 Nov 2015 22:09:02 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/11796#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11796#comment:3</guid> <description> <p> Which std version c++98 or c++11? </p> </description> <category>Ticket</category> </item> <item> <author>saboorian@…</author> <pubDate>Tue, 17 Nov 2015 06:17:04 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/11796#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11796#comment:4</guid> <description> <p> I've tested with c++11.<br /> It only happens with thread V2, because with V3 not joining/detaching a joinable thread leads to std::terminate.<br /> Actually the attached file does not show any error, and that's because I added a thread detach before assigning to a new instance. so If you want to see the error you should remove line 8, and you'll get thread resource error. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Sun, 06 Dec 2015 09:18:54 GMT</pubDate> <title>milestone changed https://svn.boost.org/trac10/ticket/11796#comment:5 https://svn.boost.org/trac10/ticket/11796#comment:5 <ul> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.60.0</span> </li> </ul> <p> You are right. Please let me know if the following works for you. </p> <p> <a class="ext-link" href="https://github.com/boostorg/thread/commit/9f55587ab0236ac1ea4203a3c0c44bc9f252f236"><span class="icon">​</span>https://github.com/boostorg/thread/commit/9f55587ab0236ac1ea4203a3c0c44bc9f252f236</a> </p> Ticket saboorian@… Sun, 06 Dec 2015 09:30:27 GMT <link>https://svn.boost.org/trac10/ticket/11796#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11796#comment:6</guid> <description> <p> Yes. This change solves the problem.<br /> Thanks for this great library. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Tue, 08 Dec 2015 21:33:43 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/11796#comment:7 https://svn.boost.org/trac10/ticket/11796#comment:7 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket