mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-19 18:45:52 +00:00
Use std::function in JobQueue.
This commit is contained in:
committed by
Nik Bougalis
parent
545b2fd6b1
commit
a6f866b4d8
@@ -36,15 +36,11 @@ protected:
|
||||
JobQueue (char const* name, Stoppable& parent);
|
||||
|
||||
public:
|
||||
using JobFunction = std::function <void (Job&)>;
|
||||
virtual ~JobQueue () { }
|
||||
|
||||
// VFALCO NOTE Using boost::function here because Visual Studio 2012
|
||||
// std::function doesn't swallow return types.
|
||||
//
|
||||
// TODO Replace with std::function
|
||||
//
|
||||
virtual void addJob (JobType type,
|
||||
std::string const& name, boost::function <void (Job&)> const& job) = 0;
|
||||
virtual void addJob (
|
||||
JobType, std::string const& name, JobFunction const&) = 0;
|
||||
|
||||
// Jobs waiting at this priority
|
||||
virtual int getJobCount (JobType t) const = 0;
|
||||
|
||||
Reference in New Issue
Block a user