mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-30 17:59:02 -04:00
moved semaphore based thread logic up to RsThread. This should help terminating service threads properly and possibly remove the SIGSEGV when quitting
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8287 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
c0ecc0da7a
commit
f2d4a237ca
4 changed files with 166 additions and 216 deletions
|
@ -26,19 +26,14 @@
|
|||
#ifndef MRK_PQI_THREAD_STREAMER_HEADER
|
||||
#define MRK_PQI_THREAD_STREAMER_HEADER
|
||||
|
||||
#include <semaphore.h>
|
||||
#include "pqi/pqistreamer.h"
|
||||
#include "util/rsthreads.h"
|
||||
|
||||
class pqithreadstreamer: public pqistreamer, private RsThread
|
||||
class pqithreadstreamer: public pqistreamer, public RsThread
|
||||
{
|
||||
public:
|
||||
pqithreadstreamer(PQInterface *parent, RsSerialiser *rss, const RsPeerId& peerid, BinInterface *bio_in, int bio_flagsin);
|
||||
|
||||
virtual void start();
|
||||
virtual void shutdown();
|
||||
virtual void fullstop();
|
||||
|
||||
virtual bool RecvItem(RsItem *item);
|
||||
virtual int tick();
|
||||
|
||||
|
@ -55,8 +50,6 @@ protected:
|
|||
private:
|
||||
/* thread variables */
|
||||
RsMutex mThreadMutex;
|
||||
sem_t mShouldStopSemaphore;
|
||||
sem_t mHasStoppedSemaphore;
|
||||
};
|
||||
|
||||
#endif //MRK_PQI_THREAD_STREAMER_HEADER
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue