1
0
Fork 0
mirror of https://gitlab.com/niansa/libcrosscoro.git synced 2025-03-06 20:53:32 +01:00
libcrosscoro/inc/coro/concepts/executor.hpp
Josh Baldwin 78b6e19927
Update docs on io_scheduler for inline processing (#84)
* Update docs on io_scheduler for inline processing

Support gcc 10.3.1 (fedora 33 updated)
Update ci.yml to run fedora 32,33,34 and support both
gcc 10.2.1 and 10.3.1

* fedora 32 -> gcc-c++ drop version

* Update ci.yml and test_latch.cpp
2021-05-22 19:58:46 -06:00

27 lines
429 B
C++

#pragma once
#include "coro/concepts/awaitable.hpp"
#include <concepts>
#include <coroutine>
namespace coro::concepts
{
template<typename type>
concept executor = requires(type t, std::coroutine_handle<> c)
{
{
t.schedule()
}
->coro::concepts::awaiter;
{
t.yield()
}
->coro::concepts::awaiter;
{
t.resume(c)
}
->std::same_as<void>;
};
} // namespace coro::concepts