Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2018-09-17 16:12:13 +0300
committerbubnikv <bubnikv@gmail.com>2018-09-17 16:12:13 +0300
commitfe3b92870f217a3356094a0a6ad60b25ccf18996 (patch)
treedd9ebd271884eef3be0270cbb34809738950b390 /xs/src/libslic3r/utils.cpp
parentd934b63424ab76ddcd8a87f272838df611dfcd0c (diff)
Merged with dev
Diffstat (limited to 'xs/src/libslic3r/utils.cpp')
-rw-r--r--xs/src/libslic3r/utils.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/xs/src/libslic3r/utils.cpp b/xs/src/libslic3r/utils.cpp
index 4c2d65605..46ee65a35 100644
--- a/xs/src/libslic3r/utils.cpp
+++ b/xs/src/libslic3r/utils.cpp
@@ -25,6 +25,8 @@
#include <boost/nowide/convert.hpp>
#include <boost/nowide/cstdio.hpp>
+#include <tbb/task_scheduler_init.h>
+
namespace Slic3r {
static boost::log::trivial::severity_level logSeverity = boost::log::trivial::error;
@@ -83,6 +85,14 @@ void trace(unsigned int level, const char *message)
(::boost::log::keywords::severity = severity)) << message;
}
+void disable_multi_threading()
+{
+ // Disable parallelization so the Shiny profiler works
+ static tbb::task_scheduler_init *tbb_init = nullptr;
+ if (tbb_init == nullptr)
+ tbb_init = new tbb::task_scheduler_init(1);
+}
+
static std::string g_var_dir;
void set_var_dir(const std::string &dir)