Skip to content

Instantly share code, notes, and snippets.

@sutm
sutm / sync_wait.hpp
Created December 21, 2021 03:01 — forked from ericniebler/sync_wait.hpp
sync_wait function for an awaitable task type
#include <cassert>
#include <mutex>
#include <condition_variable>
#include <variant>
#include <utility>
#include <exception>
#if __has_include(<coroutine>)
#include <coroutine>
namespace coro = std;