Replace boost::function with std::function

This commit is contained in:
Gunnar Beutner 2017-12-24 06:35:12 +01:00
parent ec061a9538
commit dac71b3960
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);