Seastar
High performance C++ framework for concurrent servers
|
Concrete execution stage class.
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 Member Functions | |
concrete_execution_stage (const sstring &name, scheduling_group sg, noncopyable_function< ReturnType(Args...)> f) | |
concrete_execution_stage (const sstring &name, noncopyable_function< ReturnType(Args...)> f) | |
return_type | operator() (typename internal::wrap_for_es< Args >::type... args) |
const sstring & | name () const noexcept |
Returns execution stage name. | |
const stats & | get_stats () const noexcept |
Returns execution stage usage statistics. | |
bool | flush () noexcept |
bool | poll () const noexcept |
Protected Attributes | |
bool | _empty = true |
bool | _flush_scheduled = false |
scheduling_group | _sg |
stats | _stats |
sstring | _name |
metrics::metric_group | _metric_group |
|
noexceptinherited |
Flushes execution stage
Ensures that a task which would execute all queued operations is scheduled. Does not schedule a new task if there is one already pending or the queue is empty.
|
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().
Usage example:
args | arguments passed to the stage's function |
|
inlinenoexceptinherited |
Checks whether there are pending operations.