mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-09 07:02:41 -04:00
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:
parent
f2d4a237ca
commit
e9b9dce9f5
28 changed files with 317 additions and 335 deletions
|
@ -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 ;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue