diff options
Diffstat (limited to 'src/libjin/Thread/Thread.h')
-rw-r--r-- | src/libjin/Thread/Thread.h | 13 |
1 files changed, 8 insertions, 5 deletions
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<int, Variant> share; // threads shared value + }; public: typedef int(*ThreadRunner)(void* obj); + Thread(const std::string name, ThreadRunner threadfuncs); ~Thread(); bool start(void* p); |