From 5655fee2e15bf1cfc0fe06a85e3c864dbfcd41ce Mon Sep 17 00:00:00 2001 From: Andreas Monzner Date: Tue, 30 Jan 2007 23:32:15 +0000 Subject: add a workaround to ensure that the filepush thread take notice of the stop thread signal even when no syscall is in progress --- lib/base/filepush.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'lib/base/filepush.cpp') diff --git a/lib/base/filepush.cpp b/lib/base/filepush.cpp index 554c7845..8424ae41 100644 --- a/lib/base/filepush.cpp +++ b/lib/base/filepush.cpp @@ -176,7 +176,15 @@ void eFilePushThread::stop() return; m_stop = 1; - sendSignal(SIGUSR1); + + // fixmee.. here we need a better solution to ensure + // that the thread context take notice of the signal + // even when no syscall is in progress + while(!sendSignal(SIGUSR1)) + { + eDebug("send SIGUSR1 to thread context"); + usleep(5000); // wait msek + } kill(); } -- cgit v1.2.3