X-Git-Url: http://code.vuplus.com/gitweb/?a=blobdiff_plain;f=lib%2Fcomponents%2Ffile_eraser.cpp;h=eb9c82f313e02e5e5ceb14e6e68d477ad9c98c7f;hb=3861923553aad99f8b1a5ce5d81e7d9b035b65bb;hp=6cacf04514d7a46e55c815ec24c4bd005429903a;hpb=2c76959422e7f57e43a359ff1d5ceb74dc4232d5;p=vuplus_dvbapp diff --git a/lib/components/file_eraser.cpp b/lib/components/file_eraser.cpp index 6cacf04..eb9c82f 100644 --- a/lib/components/file_eraser.cpp +++ b/lib/components/file_eraser.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -28,14 +29,21 @@ eBackgroundFileEraser::~eBackgroundFileEraser() messages.send(Message::quit); if (instance==this) instance=0; + kill(); // i dont understand why this is needed .. in ~eThread::eThread is a kill() to.. } void eBackgroundFileEraser::thread() { hasStarted(); + nice(5); + + setIoPrio(IOPRIO_CLASS_BE, 7); + reset(); + runLoop(); + stop_thread_timer.stop(); } @@ -68,7 +76,7 @@ void eBackgroundFileEraser::gotMessage(const Message &msg ) eDebug("file %s erased", msg.filename); free((char*)msg.filename); } - stop_thread_timer.start(2000, true); // stop thread in two seconds + stop_thread_timer.start(1000, true); // stop thread in one seconds break; case Message::quit: quit(0);