There are 2 threads, one of which reads data from a variable of type bool, and the other can change its value.
Are these two operations atomic to each other?
And if not, then tell me, please, any standard wrapper to make exclusive access to this variable. Of course, you can make an access method that would synchronize access, but I don’t want to reinvent the wheel.
Used Unix OS