PIThread cxx11 support
git-svn-id: svn://db.shs.com.ru/pip@883 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
#define PIP_TESTS_PICONDITIONVAR_H
|
||||
|
||||
#include "piconditionlock.h"
|
||||
#include <functional>
|
||||
#include "pithread.h"
|
||||
#include "piinit.h"
|
||||
|
||||
/**
|
||||
@@ -101,9 +101,8 @@ private:
|
||||
};
|
||||
|
||||
|
||||
class PIThread;
|
||||
typedef void (*ThreadFunc)(void * );
|
||||
|
||||
// FIXME: remove that!
|
||||
class StdFunctionThreadFuncAdapter {
|
||||
public:
|
||||
static void threadFuncStdFunctionAdapter(void* it);
|
||||
@@ -112,7 +111,7 @@ public:
|
||||
|
||||
void registerToInvoke(PIThread* thread);
|
||||
void* data() const { return (void*)this; }
|
||||
ThreadFunc threadFunc() const { return threadFuncStdFunctionAdapter; }
|
||||
ThreadFunc threadFunc() const { return threadFuncStdFunctionAdapter; }
|
||||
private:
|
||||
std::function<void()> fun;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user