Boost C++ Libraries: Ticket #9632: public method start_thread in boost::thread class https://svn.boost.org/trac10/ticket/9632 <p> There's a public method start_thread in the thread class. I couldn't find in the documentation what this method does. </p> <p> In my code I accidentally called this method and it resulted in my callback being started twice. </p> <p> Since calling the constructor implicitly starts the thread, I don't understand why such method should exist. I think that in one of the earlier versions of boost this was a private method. Is it possible that this method became public by mistake? </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9632 Trac 1.4.3 viboes Sat, 08 Feb 2014 09:06:50 GMT owner, status changed https://svn.boost.org/trac10/ticket/9632#comment:1 https://svn.boost.org/trac10/ticket/9632#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> <p> Yes this is an error, it must be private. I will fix it. </p> Ticket viboes Sat, 08 Feb 2014 15:30:45 GMT <link>https://svn.boost.org/trac10/ticket/9632#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9632#comment:2</guid> <description> <p> This patch should solve the issue. </p> <pre class="wiki">git diff ../include/boost/thread/detail/thread.hpp diff --git a/include/boost/thread/detail/thread.hpp b/include/boost/thread/detail/thread.hpp index 2434723..5053b8d 100644 --- a/include/boost/thread/detail/thread.hpp +++ b/include/boost/thread/detail/thread.hpp @@ -172,7 +172,7 @@ namespace boost private: bool start_thread_noexcept(); bool start_thread_noexcept(const attributes&amp; attr); - public: + //public: void start_thread() { if (!start_thread_noexcept()) </pre><p> Please, could you confirm if you don't find any regression with it? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Sun, 09 Feb 2014 03:00:11 GMT</pubDate> <title>milestone changed https://svn.boost.org/trac10/ticket/9632#comment:3 https://svn.boost.org/trac10/ticket/9632#comment:3 <ul> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.56.0</span> </li> </ul> <p> Committed in develop </p> <p> <a class="ext-link" href="https://github.com/boostorg/thread/commit/4a54ac033132791ee488b9ca1a323fee205a0026"><span class="icon">​</span>https://github.com/boostorg/thread/commit/4a54ac033132791ee488b9ca1a323fee205a0026</a> </p> Ticket dinazil@… Sun, 09 Feb 2014 05:05:10 GMT <link>https://svn.boost.org/trac10/ticket/9632#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9632#comment:4</guid> <description> <p> This works for me (if I change just the .hpp file), but I didn't try compiling all of boost with this change. thanks! </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Sat, 15 Feb 2014 16:22:57 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/9632#comment:5 https://svn.boost.org/trac10/ticket/9632#comment:5 <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> <p> <a class="ext-link" href="https://github.com/boostorg/thread/commit/750c849b0f0dff79a289111955260a4147ac7f59"><span class="icon">​</span>https://github.com/boostorg/thread/commit/750c849b0f0dff79a289111955260a4147ac7f59</a> </p> Ticket