mirror of
https://gitlab.com/niansa/libcrosscoro.git
synced 2025-03-06 20:53:32 +01:00
Formated
This commit is contained in:
parent
8dbad30d2c
commit
40cb369aab
6 changed files with 11 additions and 14 deletions
|
@ -12,16 +12,13 @@ concept executor = requires(type t, std::coroutine_handle<> c)
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
t.schedule()
|
t.schedule()
|
||||||
}
|
} -> coro::concepts::awaiter;
|
||||||
->coro::concepts::awaiter;
|
|
||||||
{
|
{
|
||||||
t.yield()
|
t.yield()
|
||||||
}
|
} -> coro::concepts::awaiter;
|
||||||
->coro::concepts::awaiter;
|
|
||||||
{
|
{
|
||||||
t.resume(c)
|
t.resume(c)
|
||||||
}
|
} -> std::same_as<void>;
|
||||||
->std::same_as<void>;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace coro::concepts
|
} // namespace coro::concepts
|
||||||
|
|
|
@ -9,12 +9,12 @@ namespace coro::concepts
|
||||||
* Concept to require that the range contains a specific type of value.
|
* Concept to require that the range contains a specific type of value.
|
||||||
*/
|
*/
|
||||||
template<class T, class V>
|
template<class T, class V>
|
||||||
concept range_of = std::ranges::range<T>&& std::is_same_v<V, std::ranges::range_value_t<T>>;
|
concept range_of = std::ranges::range<T> && std::is_same_v<V, std::ranges::range_value_t<T>>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Concept to require that a sized range contains a specific type of value.
|
* Concept to require that a sized range contains a specific type of value.
|
||||||
*/
|
*/
|
||||||
template<class T, class V>
|
template<class T, class V>
|
||||||
concept sized_range_of = std::ranges::sized_range<T>&& std::is_same_v<V, std::ranges::range_value_t<T>>;
|
concept sized_range_of = std::ranges::sized_range<T> && std::is_same_v<V, std::ranges::range_value_t<T>>;
|
||||||
|
|
||||||
} // namespace coro::concepts
|
} // namespace coro::concepts
|
||||||
|
|
|
@ -81,7 +81,7 @@ public:
|
||||||
event(const event&) = delete;
|
event(const event&) = delete;
|
||||||
event(event&&) = delete;
|
event(event&&) = delete;
|
||||||
auto operator=(const event&) -> event& = delete;
|
auto operator=(const event&) -> event& = delete;
|
||||||
auto operator=(event &&) -> event& = delete;
|
auto operator=(event&&) -> event& = delete;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return True if this event is currently in the set state.
|
* @return True if this event is currently in the set state.
|
||||||
|
|
|
@ -17,8 +17,8 @@ public:
|
||||||
sync_wait_event(const sync_wait_event&) = delete;
|
sync_wait_event(const sync_wait_event&) = delete;
|
||||||
sync_wait_event(sync_wait_event&&) = delete;
|
sync_wait_event(sync_wait_event&&) = delete;
|
||||||
auto operator=(const sync_wait_event&) -> sync_wait_event& = delete;
|
auto operator=(const sync_wait_event&) -> sync_wait_event& = delete;
|
||||||
auto operator=(sync_wait_event &&) -> sync_wait_event& = delete;
|
auto operator=(sync_wait_event&&) -> sync_wait_event& = delete;
|
||||||
~sync_wait_event() = default;
|
~sync_wait_event() = default;
|
||||||
|
|
||||||
auto set() noexcept -> void;
|
auto set() noexcept -> void;
|
||||||
auto reset() noexcept -> void;
|
auto reset() noexcept -> void;
|
||||||
|
|
|
@ -49,7 +49,7 @@ public:
|
||||||
task_container(const task_container&) = delete;
|
task_container(const task_container&) = delete;
|
||||||
task_container(task_container&&) = delete;
|
task_container(task_container&&) = delete;
|
||||||
auto operator=(const task_container&) -> task_container& = delete;
|
auto operator=(const task_container&) -> task_container& = delete;
|
||||||
auto operator=(task_container &&) -> task_container& = delete;
|
auto operator=(task_container&&) -> task_container& = delete;
|
||||||
~task_container()
|
~task_container()
|
||||||
{
|
{
|
||||||
// This will hang the current thread.. but if tasks are not complete thats also pretty bad.
|
// This will hang the current thread.. but if tasks are not complete thats also pretty bad.
|
||||||
|
|
|
@ -105,7 +105,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
auto operator=(const when_all_ready_awaitable&) -> when_all_ready_awaitable& = delete;
|
auto operator=(const when_all_ready_awaitable&) -> when_all_ready_awaitable& = delete;
|
||||||
auto operator=(when_all_ready_awaitable &&) -> when_all_ready_awaitable& = delete;
|
auto operator=(when_all_ready_awaitable&&) -> when_all_ready_awaitable& = delete;
|
||||||
|
|
||||||
auto operator co_await() & noexcept
|
auto operator co_await() & noexcept
|
||||||
{
|
{
|
||||||
|
@ -379,7 +379,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
auto operator=(const when_all_task&) -> when_all_task& = delete;
|
auto operator=(const when_all_task&) -> when_all_task& = delete;
|
||||||
auto operator=(when_all_task &&) -> when_all_task& = delete;
|
auto operator=(when_all_task&&) -> when_all_task& = delete;
|
||||||
|
|
||||||
~when_all_task()
|
~when_all_task()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue