mirror of https://github.com/Icinga/icinga2.git
Merge pull request #5930 from Icinga/feature/boost-function
Replace boost::function with std::function
This commit is contained in:
commit
e08da4267b
|
@ -21,7 +21,6 @@
|
||||||
#define THREADPOOL_H
|
#define THREADPOOL_H
|
||||||
|
|
||||||
#include "base/i2-base.hpp"
|
#include "base/i2-base.hpp"
|
||||||
#include <boost/function.hpp>
|
|
||||||
#include <boost/thread/thread.hpp>
|
#include <boost/thread/thread.hpp>
|
||||||
#include <boost/thread/mutex.hpp>
|
#include <boost/thread/mutex.hpp>
|
||||||
#include <boost/thread/condition_variable.hpp>
|
#include <boost/thread/condition_variable.hpp>
|
||||||
|
@ -47,7 +46,7 @@ enum SchedulerPolicy
|
||||||
class I2_BASE_API ThreadPool
|
class I2_BASE_API ThreadPool
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef boost::function<void ()> WorkFunction;
|
typedef std::function<void ()> WorkFunction;
|
||||||
|
|
||||||
ThreadPool(size_t max_threads = UINT_MAX);
|
ThreadPool(size_t max_threads = UINT_MAX);
|
||||||
~ThreadPool(void);
|
~ThreadPool(void);
|
||||||
|
|
|
@ -915,7 +915,7 @@ void Utility::SetNonBlockingSocket(SOCKET s, bool nb)
|
||||||
#endif /* _WIN32 */
|
#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);
|
Application::GetTP().Post(callback, policy);
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,7 +85,7 @@ public:
|
||||||
static void MkDirP(const String& path, int mode);
|
static void MkDirP(const String& path, int mode);
|
||||||
static bool SetFileOwnership(const String& file, const String& user, const String& group);
|
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 NaturalJoin(const std::vector<String>& tokens);
|
||||||
static String Join(const Array::Ptr& tokens, char separator, bool escapeSeparator = true);
|
static String Join(const Array::Ptr& tokens, char separator, bool escapeSeparator = true);
|
||||||
|
|
Loading…
Reference in New Issue