From 5e4a2c8fa58f30a93506c1db21aa7a9921c0affc Mon Sep 17 00:00:00 2001 From: chai Date: Fri, 7 Sep 2018 00:27:46 +0800 Subject: *format source code --- src/libjin/Thread/Thread.h | 13 ++++++++----- 1 file changed, 8 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 046c8f6..3300b4f 100644 --- a/src/libjin/Thread/Thread.h +++ b/src/libjin/Thread/Thread.h @@ -78,26 +78,29 @@ namespace thread class ThreadData { public: + static const int SLOT_ERROR = -1; + static const int SLOT_WARN = -2; + static const int SLOT_INFO = -3; + static const int SLOT_DEBUG = -4; + ThreadData(Mutex*, Conditional*); ~ThreadData(); bool exist(int slot); void set(int slot, Variant value); Variant get(int slot); void remove(int slot); + Conditional* condition; Mutex* mutex; - static const int SLOT_ERROR = -1; - static const int SLOT_WARN = -2; - static const int SLOT_INFO = -3; - static const int SLOT_DEBUG = -4; - private: std::map share; // threads shared value + }; public: typedef int(*ThreadRunner)(void* obj); + Thread(const std::string name, ThreadRunner threadfuncs); ~Thread(); bool start(void* p); -- cgit v1.1-26-g67d0