Commits

medoc committed aab92c9

threads: added recoll_threadinit calls to block signals

  • Participants
  • Parent commits 7491371

Comments (0)

Files changed (2)

src/index/fsindexer.cpp

 #include "wipedir.h"
 #include "fileudi.h"
 #include "cancelcheck.h"
+#include "rclinit.h"
 
 // When using extended attributes, we have to use the ctime. 
 // This is quite an expensive price to pay...
 #ifdef IDX_THREADS
 void *FsIndexerDbUpdWorker(void * fsp)
 {
+    recoll_threadinit();
     FsIndexer *fip = (FsIndexer*)fsp;
     WorkQueue<DbUpdTask*> *tqp = &fip->m_dwqueue;
     DebugLog::getdbl()->setloglevel(fip->m_loglevel);
 
 void *FsIndexerInternfileWorker(void * fsp)
 {
+    recoll_threadinit();
     FsIndexer *fip = (FsIndexer*)fsp;
     WorkQueue<InternfileTask*> *tqp = &fip->m_iwqueue;
     DebugLog::getdbl()->setloglevel(fip->m_loglevel);

src/rcldb/rcldb.cpp

 #include "ptmutex.h"
 #include "termproc.h"
 #include "expansiondbs.h"
+#include "rclinit.h"
 
 // Recoll index format version is stored in user metadata. When this change,
 // we can't open the db and will have to reindex.
 #ifdef IDX_THREADS
 void *DbUpdWorker(void* vdbp)
 {
+    recoll_threadinit();
     Db *dbp = (Db *)vdbp;
     WorkQueue<DbUpdTask*> *tqp = &(dbp->m_ndb->m_wqueue);
     DebugLog::getdbl()->setloglevel(dbp->m_ndb->m_loglevel);
 void Db::waitUpdIdle()
 {
     m_ndb->m_wqueue.waitIdle();
-    LOGDEB(("Db::waitUpdIdle: total work %ll mS\n", m_ndb->m_totalworkus/1000));
+    LOGDEB(("Db::waitUpdIdle: total work %lld mS\n",
+	    m_ndb->m_totalworkus/1000));
 }
 #endif