A simple C++11 thread controller