refs #306, refs #282 Thread safety of readers

In the same step:
* renaming private slots ps_xy
* doxygen
* removed outdated debug messages
This commit is contained in:
Klaus Basan
2014-07-27 02:55:16 +02:00
parent 2cf690d4fe
commit 3cf42b218a
8 changed files with 138 additions and 72 deletions

View File

@@ -6,6 +6,7 @@
#include "blackcorefreefunctions.h"
#include "voice.h"
#include "simulator.h"
#include <QThread>
namespace BlackCore
{
@@ -20,4 +21,11 @@ namespace BlackCore
qRegisterMetaType<IVoice::ConnectionStatus>("ConnectionStatus");
}
bool isCurrentThreadCreatingThread(QObject *toBeTested)
{
if (!toBeTested) return false;
if (!toBeTested->thread()) return false;
return (QThread::currentThreadId() == toBeTested->thread()->currentThreadId());
}
} // namespace