The docs [1] for the `scoped_thread` and `strict_scoped_thread` says
"While thread call std::terminate() on the destructor is the thread is joinable, strict_scoped_thread<> or scoped_thread<> join the thread if joinable.
Several other places on the page say something similar. I was under in the impression that Boost.Thread had toyed with adopting this behaviour to match `std::thread` but decided against it after complaints on this list. Am I wrong? [1] http://www.boost.org/doc/libs/1_55_0/doc/html/thread/ScopedThreads.html Alex -- Swish - Easy SFTP for Windows Explorer (http://www.swish-sftp.org)
On 7 January 2014 16:11, Alexander Lamaison wrote:
The docs [1] for the `scoped_thread` and `strict_scoped_thread` says
"While thread call std::terminate() on the destructor is the thread is joinable, strict_scoped_thread<> or scoped_thread<> join the thread if joinable.
Several other places on the page say something similar.
I was under in the impression that Boost.Thread had toyed with adopting this behaviour to match `std::thread` but decided against it after complaints on this list. Am I wrong?
It depends on a macro, but the non-standard behaviour is deprecated: http://www.boost.org/doc/libs/1_55_0/doc/html/thread/thread_management.html#...
Jonathan Wakely
On 7 January 2014 16:11, Alexander Lamaison wrote:
The docs [1] for the `scoped_thread` and `strict_scoped_thread` says
"While thread call std::terminate() on the destructor is the thread is joinable, strict_scoped_thread<> or scoped_thread<> join the thread if joinable.
Several other places on the page say something similar.
I was under in the impression that Boost.Thread had toyed with adopting this behaviour to match `std::thread` but decided against it after complaints on this list. Am I wrong?
It depends on a macro, but the non-standard behaviour is deprecated: http://www.boost.org/doc/libs/1_55_0/doc/html/thread/thread_management.html#...
Hmmm, could have sworn I remembered the decision being reversed completely. Don't get me wrong, I'm glad it's being changed. Just not what I remembered. Thanks, Alex -- Swish - Easy SFTP for Windows Explorer (http://www.swish-sftp.org)
On 8/01/2014 06:51, Quoth Alexander Lamaison:
Jonathan Wakely
writes: On 7 January 2014 16:11, Alexander Lamaison wrote:
The docs [1] for the `scoped_thread` and `strict_scoped_thread` says
"While thread call std::terminate() on the destructor is the thread is joinable, strict_scoped_thread<> or scoped_thread<> join the thread if joinable.
Several other places on the page say something similar.
I was under in the impression that Boost.Thread had toyed with adopting this behaviour to match `std::thread` but decided against it after complaints on this list. Am I wrong?
It depends on a macro, but the non-standard behaviour is deprecated: http://www.boost.org/doc/libs/1_55_0/doc/html/thread/thread_management.html#...
Hmmm, could have sworn I remembered the decision being reversed completely. Don't get me wrong, I'm glad it's being changed. Just not what I remembered.
The decision to make the default be the standard-compliant but prior-code-breaking version was reversed. Boost users currently have to explicitly opt in to Boost.Thread > 2 to get the std::thread behaviour. I'm not sure what's going to happen if those deprecations result in actually removing the code in a future version of Boost, though.
participants (3)
-
Alexander Lamaison
-
Gavin Lambert
-
Jonathan Wakely