Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Boost 1.52 compat issue #5

Closed
tkuther opened this Issue Feb 5, 2013 · 2 comments

Comments

Projects
None yet
3 participants

tkuther commented Feb 5, 2013

Hi! I'm maintaining an ArchLinux package for snapper, and we're already served with boost-1.52 there.

└» /usr/sbin/snapperd -h
usage: snapperd [--options]

    Options:
        --stdout, -s                    Log to stdout.
        --debug, -d                     Turn on debugging.

terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::thread_resource_error> >'
  what():  boost thread: thread not joinable: Invalid argument
Abgebrochen (Speicherabzug geschrieben)

Following patch fixes the issue, but to be honest I didn't really know what I'm doing there with boost threads, so not doing a real pull request, just inline

--- server/Client.cc.orig       2013-02-05 19:48:22.584228010 +0100
+++ server/Client.cc    2013-02-05 19:49:59.878490624 +0100
@@ -46,7 +46,10 @@
 Client::~Client()
 {
     thread.interrupt();
-    thread.join();
+    if (thread.joinable())
+    {
+        thread.join();
+    }

     for (list<Comparison*>::iterator it = comparisons.begin(); it != comparisons.end(); ++it)
     {
--- server/Background.cc.orig   2013-02-05 19:57:53.403603576 +0100
+++ server/Background.cc        2013-02-05 19:58:40.808202658 +0100
@@ -42,7 +42,10 @@
 Backgrounds::~Backgrounds()
 {
     thread.interrupt();
-    thread.join();
+    if (thread.joinable())
+    {
+        thread.join();
+    }
 }

Would be nice if you could review and fix it.
Thanks!

Member

aschnell commented Feb 6, 2013

Thanks, yesterday an ArchLinux user already reported the issue (http://lists.opensuse.org/yast-devel/2013-02/msg00006.html) and I came up with the same fix without testing it but didn't get any feedback.

@aschnell aschnell closed this Feb 6, 2013

cbounce commented Feb 7, 2013

thanks for the quick fix, so far it works!

@aschnell aschnell reopened this May 27, 2013

@aschnell aschnell closed this May 27, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment