C++11 version

With manual threading using std::future