aboutsummaryrefslogtreecommitdiff
path: root/src/lua/thread/Thread.h
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-08-16 14:21:56 +0800
committerchai <chaifix@163.com>2018-08-16 14:21:56 +0800
commit8585c92b7d0744a1f1a39c872cf5096621161b6c (patch)
tree6aa02138f39f7b11ab17c7399064353092b8df0c /src/lua/thread/Thread.h
parentbe9b27dbf550093b555ab3087c11b38c89ab9fd0 (diff)
*update
Diffstat (limited to 'src/lua/thread/Thread.h')
-rw-r--r--src/lua/thread/Thread.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/lua/thread/Thread.h b/src/lua/thread/Thread.h
index 6969fd8..4e39c34 100644
--- a/src/lua/thread/Thread.h
+++ b/src/lua/thread/Thread.h
@@ -8,7 +8,7 @@ namespace lua
namespace thread
{
- class Thread : public Object
+ class Thread
{
public:
typedef jin::thread::Thread::Variant Variant;
@@ -21,6 +21,11 @@ namespace thread
thread = new jin::thread::Thread(_name, runner);
}
+ ~Thread()
+ {
+ delete thread;
+ }
+
bool start(void* p)
{
return thread->start(p);
@@ -76,17 +81,10 @@ namespace thread
thread->unlock();
}
- static void threadRunner(Thread* t);
-
const std::string name;
const std::string code;
- private:
- ~Thread()
- {
- delete thread;
- }
-
+ private:
jin::thread::Thread* thread;
};