mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
Workaround for OSX non-compliant implementation of
pthread_getname_np / pthread_setname_np
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user