mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-11 10:35:22 -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
|
@ -115,6 +115,7 @@ ftController::ftController(CacheStrapper *cs, ftDataMultiplex *dm, p3ServiceCont
|
|||
_max_active_downloads = 5 ; // default queue size
|
||||
_min_prioritized_transfers = 3 ;
|
||||
/* TODO */
|
||||
cnt = 0 ;
|
||||
}
|
||||
|
||||
void ftController::setTurtleRouter(p3turtle *pt) { mTurtle = pt ; }
|
||||
|
@ -209,14 +210,10 @@ void ftController::removeFileSource(const RsFileHash& hash,const RsPeerId& peer_
|
|||
std::cerr << "... not added: hash not found." << std::endl ;
|
||||
#endif
|
||||
}
|
||||
void ftController::run()
|
||||
void ftController::data_tick()
|
||||
{
|
||||
|
||||
/* check the queues */
|
||||
uint32_t cnt = 0 ;
|
||||
|
||||
while(isRunning())
|
||||
{
|
||||
//Waiting 1 sec before start
|
||||
usleep(1*1000*1000); // 1 sec
|
||||
|
||||
|
@ -276,8 +273,6 @@ void ftController::run()
|
|||
|
||||
if(cnt++ % 10 == 0)
|
||||
checkDownloadQueue() ;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void ftController::searchForDirectSources()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue