mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
added warning when deleting a thread that isnot finished
This commit is contained in:
parent
7b2541e35c
commit
1cee069243
@ -103,6 +103,16 @@ RsThread::RsThread()
|
||||
mShouldStopSemaphore.set(0) ;
|
||||
}
|
||||
|
||||
RsThread::~RsThread()
|
||||
{
|
||||
if(isRunning())
|
||||
{
|
||||
std::cerr << "(EE) Deleting a thread that is actually running! Something is very wrong here:" << std::endl;
|
||||
|
||||
print_stacktrace();
|
||||
}
|
||||
}
|
||||
|
||||
bool RsThread::isRunning()
|
||||
{
|
||||
// do we need a mutex for this ?
|
||||
|
@ -243,7 +243,7 @@ class RsThread
|
||||
{
|
||||
public:
|
||||
RsThread();
|
||||
virtual ~RsThread() {}
|
||||
virtual ~RsThread() ;
|
||||
|
||||
void start(const std::string &threadName = "");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user