diff options
author | chai <chaifix@163.com> | 2018-08-14 16:14:32 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-08-14 16:14:32 +0800 |
commit | 57efa331c7ddc247c9b14dc19d4d98afbeb4e3b4 (patch) | |
tree | 1ebba4cd5b97a771d2f35e708ceda7193b904516 /src/libjin/Thread/Thread.h | |
parent | 0d26ed3a45f53fdbd7731b5f2a4d88edef201e44 (diff) |
*update
Diffstat (limited to 'src/libjin/Thread/Thread.h')
-rw-r--r-- | src/libjin/Thread/Thread.h | 8 |
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 |