in codelab/pi.cc [64:71]
auto operator()(const long a, const long b, int depth) const {
if (depth > max_depth) {
std::promise<bs_return_type> promise;
promise.set_value(bs(a, b, depth));
return promise.get_future();
}
return std::async(std::launch::async, bs, a, b, depth);
};