Seastar
High performance C++ framework for concurrent servers
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
seastar::execution_stage Class Referenceabstract

Detailed Description

Base execution stage class.

#include <seastar/core/execution_stage.hh>

Inheritance diagram for seastar::execution_stage:
seastar::concrete_execution_stage< ReturnType, Args >

Classes

struct  stats
 

Public Member Functions

 execution_stage (const sstring &name, scheduling_group sg={})
 
 execution_stage (const execution_stage &)=delete
 
 execution_stage (execution_stage &&)
 
const sstring & name () const noexcept
 Returns execution stage name.
 
const statsget_stats () const noexcept
 Returns execution stage usage statistics.
 
bool flush () noexcept
 
bool poll () const noexcept
 

Protected Member Functions

virtual void do_flush () noexcept=0
 

Protected Attributes

bool _empty = true
 
bool _flush_scheduled = false
 
scheduling_group _sg
 
stats _stats
 
sstring _name
 
metrics::metric_group _metric_group
 

Class Documentation

◆ seastar::execution_stage::stats

struct seastar::execution_stage::stats
Class Members
uint64_t function_calls_enqueued
uint64_t function_calls_executed
uint64_t tasks_preempted
uint64_t tasks_scheduled

Constructor & Destructor Documentation

◆ execution_stage()

seastar::execution_stage::execution_stage ( execution_stage &&  )

Move constructor

Warning
It is illegal to move execution_stage after any operation has been pushed to it. The only reason why the move constructor is not deleted is the fact that C++14 does not guarantee return value optimisation which is required by make_execution_stage().

Member Function Documentation

◆ flush()

bool seastar::execution_stage::flush ( )
noexcept

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

◆ poll()

bool seastar::execution_stage::poll ( ) const
inlinenoexcept

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: