Seastar
High performance C++ framework for concurrent servers
|
Helper to pass a parameter to a sharded<>
object that depends on the shard. It is evaluated on the shard, just before being passed to the local instance. It is useful when passing parameters to sharded::start().
#include <seastar/core/sharded.hh>
Public Member Functions | |
sharded_parameter (Func func, Params... params) | |
|
inlineexplicit |
Creates a sharded parameter, which evaluates differently based on the shard it is executed on.
func | Function to be executed |
params | optional parameters to be passed to the function. Can be std::ref(sharded<whatever>), in which case the local instance will be passed. Anything else will be passed by value unchanged. |