Seastar
High performance C++ framework for concurrent servers
|
Make a lambda coroutine safe for use in an outer coroutine with functions that accept continuations.
A lambda coroutine is not a safe parameter to a function that expects a regular Seastar continuation.
To use, wrap the lambda coroutine in seastar::coroutine::lambda(). The lambda coroutine must complete (co_await) in the same statement.
Example::
Func | type of function object (typically inferred) |
#include <seastar/core/coroutine.hh>
Public Member Functions | |
lambda (Func &&func) | |
template<typename... Args> | |
decltype(auto) | operator() (Args &&... args) const |
Calls the lambda coroutine object. Normally invoked by Seastar. | |
|
inlineexplicit |
Create a lambda coroutine wrapper from a function object, to be passed to a Seastar function that accepts a continuation.