Exporting G-code on a worker thread did not work correctly as the worker
threads were using user's locale, not "C" locale.
The "C" locale is newly enforced to TBB worker threads by
name_tbb_thread_pool_threads_set_locale()
This commit is contained in:
Vojtech Bubnik 2021-09-13 13:04:12 +02:00
parent e78d647cc2
commit f9a5ee725d
5 changed files with 23 additions and 6 deletions

View file

@ -33,7 +33,8 @@ std::optional<std::string> get_current_thread_name();
// To be called somewhere before the TBB threads are spinned for the first time, to
// give them names recognizible in the debugger.
void name_tbb_thread_pool_threads();
// Also it sets locale of the worker threads to "C" for the G-code generator to produce "." as a decimal separator.
void name_tbb_thread_pool_threads_set_locale();
template<class Fn>
inline boost::thread create_thread(boost::thread::attributes &attrs, Fn &&fn)