I am writing an application in C++14 that consists of a master thread and multiple slave threads. The master thread coordinates the slave threads which coordinately perform a search, each exploring a part of the search space. A slave thread sometimes encounters a bound on the search. Then it communicates this bound to the master thread which sends the bound to all other slave threads so that they can possibly narrow their searches.

A slave thread must very frequently check whether there is a new bound available, possibly at the entrance of a loop.

What would be the best way to communicate the bound to the slave threads? I can think of using `std::atomic<int>`, but I am afraid of the performance implications this has whenever the variable is read inside the loop.