- add sendSignal to eThread
authorFelix Domke <tmbinc@elitedvb.net>
Sat, 30 Apr 2005 17:58:18 +0000 (17:58 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Sat, 30 Apr 2005 17:58:18 +0000 (17:58 +0000)
lib/base/thread.cpp
lib/base/thread.h

index 4cff925..b75378b 100644 (file)
@@ -32,3 +32,9 @@ void eThread::kill()
        pthread_join(the_thread, 0);
        eDebug("ok");
 }
        pthread_join(the_thread, 0);
        eDebug("ok");
 }
+
+void eThread::sendSignal(int sig)
+{
+       if (alive)
+               pthread_kill(the_thread, sig);
+}
index 56b74be..80c8d92 100644 (file)
@@ -17,6 +17,7 @@ public:
 
        virtual void thread()=0;
        
 
        virtual void thread()=0;
        
+       void sendSignal(int sig);
        void kill();
 };
 
        void kill();
 };