Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix scope issue when setting thread names in the multi-threaded signature checker #1674
There are some intermittent test failures (I could only reproduce them on a MAC), caused by a SIGABRT in the ~std::unique_ptr destructor. It seems that the mutex is going out of scope before the thread pool has fully finished. When the last promise.set_value () is called it notifies the main thread that the thread work is finished, and then exits the function (set_thread_names), but the threads haven't fully finished (i.e they still need to call destructors). I'm now (re)using the class member mutex so that it stays in the scope during this cleanup.