Skip to content

Instantly share code, notes, and snippets.

@vittorioromeo
Last active May 2, 2016 13:31
Show Gist options
  • Save vittorioromeo/6e5cb8ecceeb1be4ee7e23dcf1f8be74 to your computer and use it in GitHub Desktop.
Save vittorioromeo/6e5cb8ecceeb1be4ee7e23dcf1f8be74 to your computer and use it in GitHub Desktop.
#include <thread>
#include <mutex>
#include <condition_variable>
// https://github.com/meganz/mingw-std-threads
#include "./mingw-std-threads/mingw.thread.h"
#include "./mingw-std-threads/mingw.mutex.h"
#include "./mingw-std-threads/mingw.condition_variable.h"
#define BOOST_THREAD_PROVIDES_FUTURE 1
#include <boost/thread/future.hpp>
namespace std
{
using boost::future;
using boost::launch;
template <typename... Ts>
auto async(Ts&&... xs)
{
return boost::async(std::forward<Ts>(xs)...);
}
}
#define _GLIBCXX_FUTURE 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment