Support for naming slicer own threads for debugging.

The following threads are named with this commit:
slic3r_main, slic3r_BackgroundSlicingProcess,
slic3r_tbbpool_xx_yy where xx is a one based index of the TTB thread
and yy is the platform thread ID.
This commit is contained in:
Vojtech Bubnik 2020-10-22 13:53:08 +02:00
parent 8d59abfdf8
commit 6531061d09
12 changed files with 219 additions and 38 deletions

View file

@ -46,6 +46,7 @@
#include "libslic3r/Format/SL1.hpp"
#include "libslic3r/Utils.hpp"
#include "libslic3r/AppConfig.hpp"
#include "libslic3r/Thread.hpp"
#include "PrusaSlicer.hpp"
@ -62,6 +63,9 @@ using namespace Slic3r;
int CLI::run(int argc, char **argv)
{
// Mark the main thread for the debugger and for runtime checks.
set_current_thread_name("slic3r_main");
#ifdef __WXGTK__
// On Linux, wxGTK has no support for Wayland, and the app crashes on
// startup if gtk3 is used. This env var has to be set explicitly to