Seastar
High performance C++ framework for concurrent servers
|
Concrete execution stage class, with support for automatic scheduling_group inheritance.
A variation of concrete_execution_stage that inherits the scheduling_group from the caller. Each call (of operator()
) can be in its own scheduling group.
ReturnType | return type of the function object |
Args | argument pack containing arguments to the function object, needs to have move constructor that doesn't throw |
#include <seastar/core/execution_stage.hh>
Public Types | |
using | stats = boost::container::static_vector< per_scheduling_group_stats, max_scheduling_groups()> |
Public Member Functions | |
inheriting_concrete_execution_stage (const sstring &name, noncopyable_function< ReturnType(Args...)> f) | |
return_type | operator() (typename internal::wrap_for_es< Args >::type... args) |
inheriting_execution_stage::stats | get_stats () const noexcept |
|
inline |
Construct an inheriting concrete execution stage.
name | A name for the execution stage; must be unique |
f | Function to be called in response to operator(). The function call will be deferred and batched with similar calls to increase instruction cache hit rate. |
|
inlinenoexcept |
Returns summary of individual execution stage usage statistics
|
inline |
Enqueues a call to the stage's function
Adds a function call to the queue. Objects passed by value are moved, rvalue references are decayed and the objects are moved, lvalue references need to be explicitly wrapped using seastar::ref().
The caller's scheduling_group will be preserved across the call.
Usage example:
args | arguments passed to the stage's function |