Asynchronous programming with std::bind and std::function