mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-15 23:15:54 +08:00
Follow-up of a47446574eb3f831907248dc841eb6f7684bbdb3 - Disable tbb::task_scheduler_observer in TBBLocalesSetter destructor.
The base class wasn't disabling observing when tbb::task_scheduler_observer was destructed, which leads to undefined behavior.
This commit is contained in:
parent
345ee7cf28
commit
6bdaf0eaec
@ -1501,7 +1501,7 @@ class TBBLocalesSetter : public tbb::task_scheduler_observer
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TBBLocalesSetter() { this->observe(true); }
|
TBBLocalesSetter() { this->observe(true); }
|
||||||
~TBBLocalesSetter() override = default;
|
~TBBLocalesSetter() override { this->observe(false); };
|
||||||
|
|
||||||
void on_scheduler_entry(bool is_worker) override
|
void on_scheduler_entry(bool is_worker) override
|
||||||
{
|
{
|
||||||
@ -1513,7 +1513,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
tbb::enumerable_thread_specific<bool, tbb::cache_aligned_allocator<bool>, tbb::ets_key_usage_type::ets_key_per_instance> m_is_locales_sets;
|
tbb::enumerable_thread_specific<bool, tbb::cache_aligned_allocator<bool>, tbb::ets_key_usage_type::ets_key_per_instance> m_is_locales_sets{false};
|
||||||
};
|
};
|
||||||
|
|
||||||
// Process all layers of all objects (non-sequential mode) with a parallel pipeline:
|
// Process all layers of all objects (non-sequential mode) with a parallel pipeline:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user