mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-27 00:19:25 -05:00
detach pqistreamer threads to allow resource cleanup or re-use
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8113 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
28030f9b08
commit
32d1bd7b04
@ -73,6 +73,9 @@ void pqithreadstreamer::run()
|
||||
std::cerr << "pqithreadstream::run()";
|
||||
std::cerr << std::endl;
|
||||
|
||||
// tell the OS to free the thread resources when this function exits
|
||||
// it is a replacement for pthread_join()
|
||||
pthread_detach(pthread_self());
|
||||
|
||||
while(1)
|
||||
{
|
||||
|
@ -30,23 +30,23 @@
|
||||
#include "pqi/pqistreamer.h"
|
||||
#include "util/rsthreads.h"
|
||||
|
||||
class pqithreadstreamer: public pqistreamer, public RsThread
|
||||
class pqithreadstreamer: public pqistreamer, private RsThread
|
||||
{
|
||||
public:
|
||||
pqithreadstreamer(PQInterface *parent, RsSerialiser *rss, const RsPeerId& peerid, BinInterface *bio_in, int bio_flagsin);
|
||||
|
||||
virtual void run();
|
||||
virtual void start();
|
||||
virtual void shutdown();
|
||||
virtual void fullstop();
|
||||
//virtual bool threadrunning();
|
||||
|
||||
virtual bool RecvItem(RsItem *item);
|
||||
virtual int tick();
|
||||
|
||||
protected:
|
||||
// from RsThread
|
||||
virtual void run();
|
||||
|
||||
int data_tick();
|
||||
int data_tick();
|
||||
|
||||
PQInterface *mParent;
|
||||
uint32_t mTimeout;
|
||||
|
Loading…
Reference in New Issue
Block a user