aboutsummaryrefslogtreecommitdiff
path: root/src/libjin/thread/thread.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libjin/thread/thread.h')
-rw-r--r--src/libjin/thread/thread.h13
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);