Follow-up of a47446574e
- 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
867b1f99d6
commit
792caae0ca
1 changed files with 2 additions and 2 deletions
|
@ -1550,7 +1550,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
|
||||||
{
|
{
|
||||||
|
@ -1562,7 +1562,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…
Add table
Add a link
Reference in a new issue