High performance C++ framework for concurrent servers
Public Member Functions | List of all members
seastar::sharded_parameter< Func, Params > Class Template Reference

Detailed Description

template<typename Func, typename... Params>
class seastar::sharded_parameter< Func, Params >

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)

Constructor & Destructor Documentation

◆ sharded_parameter()

template<typename Func , typename... Params>
seastar::sharded_parameter< Func, Params >::sharded_parameter ( Func  func,
Params...  params 

Creates a sharded parameter, which evaluates differently based on the shard it is executed on.

funcFunction to be executed
paramsoptional 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.

The documentation for this class was generated from the following file: