Skip to content

Instantly share code, notes, and snippets.

@Chronial
Chronial / run_in_thread.h
Last active October 28, 2021 22:05
A portable version of std::async(std::launch::async, ...), see https://github.com/microsoft/STL/issues/949
#pragma once
#include <functional>
#include <future>
#include <chrono>
#include <thread>
#include <type_traits>
template <class V>
class JoiningFuture;