Threading using std::async.