From e0592745a40dae2e14e5b6d9226f41a293ababc9 Mon Sep 17 00:00:00 2001 From: deva Date: Thu, 16 Jun 2005 21:28:57 +0000 Subject: Rewrote thread object Fixed bug in mov_encoder (pushed read_sem too many times, whihc lead to growing server queue) --- src/thread.cc | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'src/thread.cc') 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 -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); +} -- cgit v1.2.3