progschj / ThreadPool

A simple C++11 Thread Pool implementation
zlib License
7.64k stars 2.21k forks source link

Why not use std::atomic<bool> instead of bool? #50

Open Igamegum opened 6 years ago

Igamegum commented 6 years ago

The member variable stop

wilx commented 6 years ago

You do not need atomic access there because you still have to cover its use with mutex when you are using the conditional variable.

jellynian commented 6 years ago

oh , I see your answer here.