aboutsummaryrefslogtreecommitdiff
path: root/src/libjin/Thread/Thread.h
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-08-14 16:14:32 +0800
committerchai <chaifix@163.com>2018-08-14 16:14:32 +0800
commit57efa331c7ddc247c9b14dc19d4d98afbeb4e3b4 (patch)
tree1ebba4cd5b97a771d2f35e708ceda7193b904516 /src/libjin/Thread/Thread.h
parent0d26ed3a45f53fdbd7731b5f2a4d88edef201e44 (diff)
*update
Diffstat (limited to 'src/libjin/Thread/Thread.h')
-rw-r--r--src/libjin/Thread/Thread.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/libjin/Thread/Thread.h b/src/libjin/Thread/Thread.h
index 5b74f23..046c8f6 100644
--- a/src/libjin/Thread/Thread.h
+++ b/src/libjin/Thread/Thread.h
@@ -97,10 +97,10 @@ namespace thread
};
public:
- typedef void(ThreadRunner)(Thread* thread);
+ typedef int(*ThreadRunner)(void* obj);
Thread(const std::string name, ThreadRunner threadfuncs);
~Thread();
- bool start();
+ bool start(void* p);
void wait();
void send(int slot, const Variant& value);
bool receive(int slot);
@@ -120,7 +120,7 @@ namespace thread
#endif
Mutex* mutex; // mutex variable
Conditional* condition; // condition variable
- ThreadRunner* threadRunner; // thread function
+ ThreadRunner threadRunner; // thread function
ThreadData* common; // threads common data
const std::string name; // thread name, for debugging purposes
/**
@@ -154,8 +154,6 @@ namespace thread
*/
bool running; // running
- static int ThreadFunciton(void* p);
-
};
} // thread