From 57efa331c7ddc247c9b14dc19d4d98afbeb4e3b4 Mon Sep 17 00:00:00 2001 From: chai Date: Tue, 14 Aug 2018 16:14:32 +0800 Subject: *update --- src/libjin/Thread/thread.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/libjin/Thread/thread.h') 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 -- cgit v1.1-26-g67d0