template<typename ReturnType, typename... Args>
class seastar::concrete_execution_stage< ReturnType, Args >
Concrete execution stage class.
- Note
- The recommended way of creating execution stages is to use make_execution_stage().
- Template Parameters
-
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>
◆ flush()
bool seastar::execution_stage::flush |
( |
| ) |
|
|
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.
- Returns
- true if a new task has been scheduled
◆ operator()()
template<typename ReturnType , typename... Args>
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:
void do_something(int&, int, std::vector<int>&&);
int global_value;
return stage(
seastar::ref(global_value), 42, std::move(vec));
}
auto make_execution_stage(const sstring &name, scheduling_group sg, Function &&fn)
Definition: execution_stage.hh:455
reference_wrapper< T > ref(T &object) noexcept
Wraps reference in a reference_wrapper.
Definition: reference_wrapper.hh:62
- Parameters
-
args | arguments passed to the stage's function |
- Returns
- future containing the result of the call to the stage's function
◆ poll()
bool seastar::execution_stage::poll |
( |
| ) |
const |
|
inlinenoexceptinherited |
Checks whether there are pending operations.
- Returns
- true if there is at least one queued operation
The documentation for this class was generated from the following file: