summaryrefslogtreecommitdiff
path: root/src/thread.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/thread.cc')
-rw-r--r--src/thread.cc20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/thread.cc b/src/thread.cc
index 1d59f74..e38774e 100644
--- a/src/thread.cc
+++ b/src/thread.cc
@@ -31,6 +31,11 @@
/*
* $Log$
+ * Revision 1.4 2005/06/16 21:28:57 deva
+ * Rewrote thread object
+ * Fixed bug in mov_encoder (pushed read_sem too many times, whihc lead to
+ * growing server queue)
+ *
* Revision 1.3 2005/05/03 08:31:59 deva
* Removed the error object, and replaced it with a more generic info object.
*
@@ -43,8 +48,19 @@
#include "thread.h"
#include <stdio.h>
-void* thread_run(void *data) {
+static void* thread_run(void *data) {
Thread *t = (Thread*)data;
- t->run();
+ t->thread_main();
return NULL;
}
+
+Thread::Thread()
+{}
+
+Thread::~Thread()
+{}
+
+void Thread::run()
+{
+ pthread_create (&tid, NULL, thread_run, this);
+}