libcoro  1.0
Coroutine support library for C++20
Classes | Typedefs
Coroutines
+ Collaboration diagram for Coroutines:

Classes

class  coro::async< T, Alloc >
 COROUTINE: Coroutine for asynchronous operation. More...
 
class  coro::basic_coroutine< Alloc >
 COROUTINE: Basic coroutine. More...
 
class  coro::future< T >
 Contains future value of T, can be co_awaited in coroutine. More...
 
class  coro::deferred_future< T >
 Contains future value of T, where evaluation is deferred until the value is needed. More...
 
class  coro::generator< T, Alloc >
 COROUTINE: Generator. More...
 
class  coro::subscription< T, SubscribeFn >
 Awaiter for subscriptions. More...
 

Typedefs

using coro::coroutine = basic_coroutine< std_allocator >
 COROUTINE: Basic coroutine, always detached, with no return value. More...
 

Detailed Description

Classes which can be used to write coroutines

coro::coroutine my_coro1(...) {
co_await...;
co_return...;
}
coro::async<int> my_coro2(...) {
co_await...;
co_return...;
}
coro::future<int> my_coro3(...) {
co_await...;
co_return...;
}
COROUTINE: Coroutine for asynchronous operation.
Definition: async.h:55
COROUTINE: Basic coroutine.
Definition: coroutine.h:28
Contains future value of T, can be co_awaited in coroutine.
Definition: future.h:417