do unlock thread before send signal
[enigma2.git] / lib / base / thread.cpp
index a3edef3ec56aebdfe3b81e6ec5d03c5043b53f27..b64ba1365bfb2376e69e36ce1da73ffb1614c4bc 100644 (file)
@@ -15,6 +15,7 @@ void eThread::thread_completed(void *ptr)
 void *eThread::wrapper(void *ptr)
 {
        eThread *p = (eThread*)ptr;
+       p->before_set_thread_alive();
        p->alive=1;
        pthread_cleanup_push( thread_completed, (void*)p );
        p->thread();
@@ -51,10 +52,10 @@ void eThread::run( int prio, int policy )
        }
        pthread_attr_destroy(&attr);
        usleep(1000);
-       int timeout=20;
+       int timeout=50;
        while(!alive && timeout--)
        {
-               eDebug("waiting for thread start...");
+//             eDebug("waiting for thread start...");
                usleep(1000*10);
        }
        if ( !timeout )