mirror of
https://gitlab.com/niansa/libcrosscoro.git
synced 2025-03-06 20:53:32 +01:00
* 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
27 lines
429 B
C++
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
|