generally prevent threads to start twice, and fixed bug causing DirWatcher to be run twice

This commit is contained in:
cyril soler 2016-11-07 10:09:28 +01:00
parent eb95c6895a
commit 461975f115
2 changed files with 8 additions and 3 deletions

View file

@ -157,6 +157,11 @@ void RsTickingThread::fullstop()
void RsThread::start(const std::string &threadName)
{
if(isRunning())
{
std::cerr << "(EE) RsThread \"" << threadName << "\" is already running. Will not start twice!" << std::endl;
return ;
}
pthread_t tid;
void *data = (void *)this ;