Boost C++ Libraries: Ticket #9094: Missing boot::thread::thread(detail::thread_data_ptr data) constructor implementation for pthreads https://svn.boost.org/trac10/ticket/9094 <p> pthread's implementation of thread.cpp missing thread::thread(detail::thread_data_ptr data) constructor implementation. I have copied implementation from win32-version of thread.cpp and all going ok: </p> <pre class="wiki"> thread::thread(detail::thread_data_ptr data): thread_info(data) {} </pre><p> Please, fix this little bug in new release if possible. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9094 Trac 1.4.3 viboes Mon, 09 Sep 2013 17:48:33 GMT <link>https://svn.boost.org/trac10/ticket/9094#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9094#comment:1</guid> <description> <p> Please, could you add an example, the compiler, platform and error you are getting. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Mon, 09 Sep 2013 17:48:40 GMT</pubDate> <title>owner, status changed https://svn.boost.org/trac10/ticket/9094#comment:2 https://svn.boost.org/trac10/ticket/9094#comment:2 <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, 09 Sep 2013 17:58:11 GMT <link>https://svn.boost.org/trac10/ticket/9094#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9094#comment:3</guid> <description> <p> I have commented this line on windows and everything works </p> <blockquote> <p> <em>explicit thread(detail::thread_data_ptr data); </em></p> </blockquote> <p> It seems it is not used. </p> </description> <category>Ticket</category> </item> <item> <author>leonardo@…</author> <pubDate>Tue, 10 Sep 2013 08:11:25 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9094#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9094#comment:4</guid> <description> <p> We a using boost::thread in our cross-platform code (Windows XP/Vista/7/8 and Linux Debian 7.0). Used compilers: MSVC++ v.9.0 (vs2008), GCC v.4.6.3. </p> <p> On Windows platform we have no problems while building our code. On Linux (GCC v.4.6.3) we have an error while trying to link boost_thread.a library, cause it has no implementation of thread(detail::thread_data_ptr data). </p> <p> This constructor is only the way to separate thread initialization from starting/stopping/restarting thread execution, for ex.: </p> <pre class="wiki"> // our wrapper-class for thread class thread_object_t : public virtual thread_object_i // thread-object interface { private: vptr_t thread_args; // thread entry custom arguments boost::thread thread_impl; // using boost::thread implementation ... }; // init thread object, setting thread entry to thread_object_t::thread_impl_entry() void thread_object_t::init_thread_impl() { thread_impl = boost::thread(boost::thread::make_thread_info(boost::bind(boost::type&lt;void&gt;(), thread_impl_entry, this))); } // thread start method, separated from thread initialization (with custom stack size) void thread_object_t::start(vptr_t new_thread_args) { thread_args = new_thread_args; boost::thread_attributes thread_attributes; thread_attributes.set_stack_size(max_stack_size); thread_impl.start_thread(thread_attributes); } </pre><p> Please, don't remove this constructor, cause it is only the way to do things that we need (flexible controll of thread-entry, thread stack, thread execution). </p> <p> Simple solution is to use one implementation of this constructor for both win32 and pthread versions: </p> <pre class="wiki">thread::thread(detail::thread_data_ptr data): thread_info(data) {} </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Tue, 10 Sep 2013 19:23:22 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9094#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9094#comment:5</guid> <description> <p> Sorry, this constructor is not in the public documented interface. </p> <p> Please let me know why you can not do what you want to do with the public interface, I will try to fix anything is really needed. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Tue, 10 Sep 2013 19:24:07 GMT</pubDate> <title>type changed https://svn.boost.org/trac10/ticket/9094#comment:6 https://svn.boost.org/trac10/ticket/9094#comment:6 <ul> <li><strong>type</strong> <span class="trac-field-old">Bugs</span> → <span class="trac-field-new">Support Requests</span> </li> </ul> Ticket viboes Tue, 10 Sep 2013 20:52:59 GMT severity changed https://svn.boost.org/trac10/ticket/9094#comment:7 https://svn.boost.org/trac10/ticket/9094#comment:7 <ul> <li><strong>severity</strong> <span class="trac-field-old">Problem</span> → <span class="trac-field-new">Not Applicable</span> </li> </ul> Ticket viboes Sat, 14 Sep 2013 14:26:50 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/9094#comment:8 https://svn.boost.org/trac10/ticket/9094#comment:8 <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">invalid</span> </li> </ul> <p> Closed as you are using details of the implementation. Please create a feature request for whatever new feature you need. </p> Ticket