mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Workaround for OSX non-compliant implementation of
pthread_getname_np / pthread_setname_np
This commit is contained in:
parent
0d2c31d0e4
commit
723406dfea
2 changed files with 36 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
|||
#include "libslic3r/Utils.hpp"
|
||||
#include "AppConfig.hpp"
|
||||
#include "Exception.hpp"
|
||||
#include "Thread.hpp"
|
||||
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
@ -212,6 +213,9 @@ std::string AppConfig::load()
|
|||
|
||||
void AppConfig::save()
|
||||
{
|
||||
if (get_current_thread_name() != "slic3r_main")
|
||||
throw CriticalException("Calling AppConfig::save() from a worker thread!");
|
||||
|
||||
// The config is first written to a file with a PID suffix and then moved
|
||||
// to avoid race conditions with multiple instances of Slic3r
|
||||
const auto path = config_path();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue