|
Hi,
after updating from 1.51.0 to 1.52.0 call to a thread::join() throws "invalid_argument" / not joinable. I see that there is a change with regards to thread d-tor in this version but I don't really understand if and why this is related.
Should joinable() be called now before every join()?
_______________________________________________ Boost-users mailing list [hidden email] http://lists.boost.org/mailman/listinfo.cgi/boost-users |
|
> after updating from 1.51.0 to 1.52.0 call to a thread::join() throws
> "invalid_argument" / not joinable. I see that there is a change with regards > to thread d-tor in this version but I don't really understand if and why > this is related. > > Should joinable() be called now before every join()? Yes, you should check that the thread is joinable or ensure that BOOST_THREAD_TRROW_IF_PRECONDITION_NOT_SATISFIED is not defined. http://www.boost.org/doc/libs/1_52_0/doc/html/thread/thread_management.html#thread.thread_management.thread.join _______________________________________________ Boost-users mailing list [hidden email] http://lists.boost.org/mailman/listinfo.cgi/boost-users |
|
OK, clear. Thing is thread is actually being join()ed by thread_group::join_all() which does not do the check. Is that a bug or I am using it wrong now too?
2012/11/8 Igor R <[hidden email]>
Szymon Gatner The Lordz Games Studio www.thelordzgamesstudio.com _______________________________________________ Boost-users mailing list [hidden email] http://lists.boost.org/mailman/listinfo.cgi/boost-users |
|
> OK, clear. Thing is thread is actually being join()ed by
> thread_group::join_all() which does not do the check. Is that a bug or I am > using it wrong now too? Not sure if it can be defined as a "bug", but thread_group definitely doesn't keep up with all the new thread features. _______________________________________________ Boost-users mailing list [hidden email] http://lists.boost.org/mailman/listinfo.cgi/boost-users |
Understood. A question then: why did this thread became unjoinnable? It was never explicitly detached. _______________________________________________ Boost-users mailing list [hidden email] http://lists.boost.org/mailman/listinfo.cgi/boost-users |
|
In reply to this post by Szymon Gatner
Le 08/11/12 19:28, Szymon Gatner a
écrit :
Hi,Hi, join() requires that the threads is joinable, as there is only one thread owner the owner is able to know if the thread has been joined or not. See http://www.boost.org/doc/libs/1_51_0/doc/html/thread/thread_management.html#thread.thread_management.thread.join void join();
Note that this requirement was already since 1.45, but the implementation didn't throw. void join();
You can disable this by commenting this line in the Jamfile <define>BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED The idea was to not commit this line and let the user to define this macro. Sorry for the disturbance. Best, Vicente _______________________________________________ Boost-users mailing list [hidden email] http://lists.boost.org/mailman/listinfo.cgi/boost-users |
|
In reply to this post by Szymon Gatner
Le 08/11/12 21:10, Szymon Gatner a
écrit :
You are right. I have left thread_group a little bit on the road. Please, could you create a ticket? I will fix this very soon. Please, could you post a short example that shows the issue? Thanks, Vicente _______________________________________________ Boost-users mailing list [hidden email] http://lists.boost.org/mailman/listinfo.cgi/boost-users |
|
> You are right. I have left thread_group a little bit on the road. Please,
> could you create a ticket? I will fix this very soon. Done! Thanks. _______________________________________________ Boost-users mailing list [hidden email] http://lists.boost.org/mailman/listinfo.cgi/boost-users |
| Powered by Nabble | Edit this page |
