diff options
| author | ghost <andreas.monzner@multimedia-labs.de> | 2011-09-06 15:16:48 +0200 |
|---|---|---|
| committer | ghost <andreas.monzner@multimedia-labs.de> | 2011-09-06 15:16:48 +0200 |
| commit | 4712fa7b44263f0e9517bb5a4b1729d922994572 (patch) | |
| tree | f7ea622f401fcc6438b5dbec4ea109ac4390df67 /lib | |
| parent | acb231d17468a18e7ee92654b8cdf07059a9ca66 (diff) | |
| parent | 4c4383379548e25763887d79b45576b015ece7b5 (diff) | |
| download | enigma2-4712fa7b44263f0e9517bb5a4b1729d922994572.tar.gz enigma2-4712fa7b44263f0e9517bb5a4b1729d922994572.zip | |
Merge remote-tracking branch 'origin/bug_749_ethread_bugfix'
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/base/thread.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/base/thread.cpp b/lib/base/thread.cpp index fa923deb..1fda6a47 100644 --- a/lib/base/thread.cpp +++ b/lib/base/thread.cpp @@ -58,7 +58,12 @@ int eThread::runAsync(int prio, int policy) pthread_attr_setschedpolicy(&attr, policy); pthread_attr_setschedparam(&attr, &p); } - + + if (the_thread) { + eDebug("old thread joined %d", pthread_join(the_thread, 0)); + the_thread = 0; + } + if (pthread_create(&the_thread, &attr, wrapper, this)) { pthread_attr_destroy(&attr); @@ -69,7 +74,7 @@ int eThread::runAsync(int prio, int policy) pthread_attr_destroy(&attr); return 0; -} +} int eThread::run(int prio, int policy) { |
