Represents a configuration for a specific scheduling group value, it contains all that is needed to maintain a scheduling group specific value when it needs to be created, due to, for example, a new scheduling_group being created.
- Note
- is is recomended to use make_scheduling_group_key_config in order to create and configure this syructure. The only reason that one might want to not use this method is because of a need for specific intervention in the construction or destruction of the value. Even then, it is recommended to first create the configuration with make_scheduling_group_key_config and only the change it.
#include <seastar/core/scheduling.hh>
|
size_t | allocation_size |
| The allocation size for the value (usually: sizeof(T))
|
|
size_t | alignment |
| The required alignment of the value (usually: alignof(T))
|
|
std::type_index | type_index |
| Holds the type information for debug mode runtime validation.
|
|
std::function< void(void *)> | constructor |
| A function that will be called for each newly allocated value.
|
|
std::function< void(void *)> | rename |
| A function that will be called for each value after the scheduling group is renamed.
|
|
std::function< void(void *)> | destructor |
|
◆ scheduling_group_key_config() [1/2]
seastar::scheduling_group_key_config::scheduling_group_key_config |
( |
| ) |
|
|
inline |
Constructs a default configuration
◆ scheduling_group_key_config() [2/2]
seastar::scheduling_group_key_config::scheduling_group_key_config |
( |
const std::type_info & |
type_info | ) |
|
|
inline |
Creates a configuration that is made for a specific type. It does not contain the right alignment and allocation sizes neither the correct construction or destruction logic, but only the indication for the intended type which is used in debug mode to make sure that the correct type is reffered to when accessing the value.
- Parameters
-
type_info | - the type information class (create with typeid(T)). |
◆ destructor
std::function<void (void*)> seastar::scheduling_group_key_config::destructor |
A function that will be called for each element that is about to be dealocated.
The documentation for this struct was generated from the following file: