I am working in VS2015 with C++11.

I have two threads going, and one is adding data to a queue. I have another function setting a flag of when i want to send all the data over. This variable is only used in these two threads.

Do I need to add any locks around this flag between the two threads? Would I be better off using an atomic?