Looking further in the code, the use of ```std::atomic<bool>``` isn't proper since it still allows multiple threads to do the 'initail' work. To make it only one thread one changes
```
if(... !config_dumped) {
...
config_dumped = true;
}
```
to
```
bool expected = false;
if(... config_dumped.compare_exchange_strong(false,true, std::memory_order_acq_rel) ) {
...
}
```
There is no need for a later ```config_dumped=true``` since the ```compare_exchange_strong``` will set it to ```true``` for the first thread to hit that line.

NOTE: this only works if the body of work in the ```if(...) { }``` block doesn't do any work needed by the algorithm after that block. If it does, then we'd have to use ```std::call_once(...)``` instead.