replacing non-functional std::async