mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-13 16:39:43 -05:00
attempt to fix never ending thread. To be tested.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7982 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
10162590ae
commit
2044575067
@ -88,7 +88,7 @@ void pqithreadstreamer::run()
|
||||
|
||||
void pqithreadstreamer::stop()
|
||||
{
|
||||
// RsStackMutex stack(mThreadMutex);
|
||||
//RsStackMutex stack(mThreadMutex);
|
||||
|
||||
std::cerr << "pqithreadstream::stop()";
|
||||
std::cerr << std::endl;
|
||||
@ -98,17 +98,20 @@ void pqithreadstreamer::stop()
|
||||
|
||||
void pqithreadstreamer::fullstop()
|
||||
{
|
||||
stop();
|
||||
|
||||
while(1)
|
||||
{
|
||||
RsStackMutex stack(mThreadMutex);
|
||||
if (!mRunning)
|
||||
{
|
||||
std::cerr << "pqithreadstream::fullstop() complete";
|
||||
std::cerr << std::endl;
|
||||
return;
|
||||
}
|
||||
{
|
||||
{
|
||||
RsStackMutex stack(mThreadMutex);
|
||||
|
||||
mToRun = false ;
|
||||
|
||||
if (!mRunning)
|
||||
{
|
||||
std::cerr << "pqithreadstream::fullstop() complete";
|
||||
std::cerr << std::endl;
|
||||
return;
|
||||
}
|
||||
}
|
||||
usleep(1000);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user