Skip to content

Instantly share code, notes, and snippets.

@chrhlnd
chrhlnd / atest.cpp
Last active December 23, 2023 16:48
Hmm Async?
#include <iostream>
#include <functional>
#include <vector>
#include <random>
static std::mt19937_64 gen{ std::random_device()() };
static std::uniform_real_distribution<double> dis{ 0.0, 1.0 };
using namespace std;
class Task
{
public:
enum class Result
{
More,
Error,
Done,
};