Merge pull request #5930 from Icinga/feature/boost-function

Replace boost::function with std::function
This commit is contained in:
Michael Friedrich 2018-01-02 13:46:23 +01:00 committed by GitHub
commit e08da4267b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 4 deletions

View File

@ -21,7 +21,6 @@
#define THREADPOOL_H
#include "base/i2-base.hpp"
#include <boost/function.hpp>
#include <boost/thread/thread.hpp>
#include <boost/thread/mutex.hpp>
#include <boost/thread/condition_variable.hpp>
@ -47,7 +46,7 @@ enum SchedulerPolicy
class I2_BASE_API ThreadPool
{
public:
typedef boost::function<void ()> WorkFunction;
typedef std::function<void ()> WorkFunction;
ThreadPool(size_t max_threads = UINT_MAX);
~ThreadPool(void);

View File

@ -915,7 +915,7 @@ void Utility::SetNonBlockingSocket(SOCKET s, bool nb)
#endif /* _WIN32 */
}
void Utility::QueueAsyncCallback(const boost::function<void (void)>& callback, SchedulerPolicy policy)
void Utility::QueueAsyncCallback(const std::function<void (void)>& callback, SchedulerPolicy policy)
{
Application::GetTP().Post(callback, policy);
}

View File

@ -85,7 +85,7 @@ public:
static void MkDirP(const String& path, int mode);
static bool SetFileOwnership(const String& file, const String& user, const String& group);
static void QueueAsyncCallback(const boost::function<void (void)>& callback, SchedulerPolicy policy = DefaultScheduler);
static void QueueAsyncCallback(const std::function<void (void)>& callback, SchedulerPolicy policy = DefaultScheduler);
static String NaturalJoin(const std::vector<String>& tokens);
static String Join(const Array::Ptr& tokens, char separator, bool escapeSeparator = true);