created 2 subclasses of RsThread, one for ticking services, and one for single shot jobs. Now all threads use the same base code.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8288 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2015-05-22 20:54:38 +00:00
parent f2d4a237ca
commit e9b9dce9f5
28 changed files with 317 additions and 335 deletions

View file

@ -542,13 +542,13 @@ bool ftTransferModule::isCheckingHash()
return mFlag == FT_TM_FLAG_CHECKING || mFlag == FT_TM_FLAG_CHUNK_CRC;
}
class HashThread: public RsThread
class HashThread: public RsSingleJobThread
{
public:
HashThread(ftFileCreator *m)
: _hashThreadMtx("HashThread"), _m(m),_finished(false),_hash("") {}
virtual void run()
virtual void run()
{
#ifdef FT_DEBUG
std::cerr << "hash thread is running for file " << std::endl;
@ -609,8 +609,6 @@ bool ftTransferModule::checkFile()
RsFileHash check_hash( _hash_thread->hash() ) ;
_hash_thread->join(); // allow releasing of resources when finished.
delete _hash_thread ;
_hash_thread = NULL ;