diff options
author | deva <deva> | 2005-06-16 21:28:57 +0000 |
---|---|---|
committer | deva <deva> | 2005-06-16 21:28:57 +0000 |
commit | e0592745a40dae2e14e5b6d9226f41a293ababc9 (patch) | |
tree | b3640c07fd6af71aa01bed384613ffda6c03bf41 /src/thread.cc | |
parent | c397f2dcdc399b43cf150f8000e711fc20613deb (diff) |
Rewrote thread object
Fixed bug in mov_encoder (pushed read_sem too many times, whihc lead to
growing server queue)
Diffstat (limited to 'src/thread.cc')
-rw-r--r-- | src/thread.cc | 20 |
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); +} |