Lines Matching defs:Coroutine
52 * This template defines a Coroutine wrapper type with a Boost-like
64 class Coroutine : public Fiber
68 // in case the channel should be void (Coroutine template parameters
87 friend class Coroutine;
89 CallerType(Coroutine& _coro) : coro(_coro), callerFiber(nullptr) {}
149 Coroutine& coro;
154 Coroutine() = delete;
155 Coroutine(const Coroutine& rhs) = delete;
156 Coroutine& operator=(const Coroutine& rhs) = delete;
159 * Coroutine constructor.
162 * reference to the Coroutine<Arg,Ret>::caller_type which the
164 * The optional second boolean argument controls if the Coroutine
165 * should be run on creation, which mimics Boost's Coroutine
167 * avoid unnecessary context switches on Coroutine creation.
173 Coroutine(std::function<void(CallerType&)> f, bool run_coroutine = true)
176 // When desired, run the Coroutine after it is created
181 virtual ~Coroutine() {}
184 /** Coroutine interface */
194 Coroutine&
210 typename std::enable_if<std::is_same<T, void>::value, Coroutine>::type&
264 /** Coroutine task */
267 /** Coroutine caller */