cortex 0.0.1
Loading...
Searching...
No Matches
coroutine_suspend_context.hpp
Go to the documentation of this file.
1#pragma once
2
8namespace cortex {
9
18public:
19 static void* operator new(std::size_t) = delete;
20 static void* operator new[](std::size_t) = delete;
21
22public:
27
34 virtual void Suspend() = 0;
35
36protected:
37 virtual ~CoroutineSuspendContext() = default;
39};
40
41} // namespace cortex
Provides a mechanism for a coroutine to suspend itself.
Definition coroutine_suspend_context.hpp:17
CoroutineSuspendContext & operator=(CoroutineSuspendContext &&)=delete
CoroutineSuspendContext(CoroutineSuspendContext &&)=delete
CoroutineSuspendContext & operator=(const CoroutineSuspendContext &)=delete
virtual void Suspend()=0
Suspends the current coroutine's execution.
virtual ~CoroutineSuspendContext()=default
CoroutineSuspendContext(const CoroutineSuspendContext &)=delete
Definition base_coroutine.hpp:14