mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-01 21:54:55 -04:00
LimeSDR input: start or stop thread only if not started or stopped
This commit is contained in:
@@ -36,6 +36,8 @@ LimeSDRInputThread::~LimeSDRInputThread()
|
||||
|
||||
void LimeSDRInputThread::startWork()
|
||||
{
|
||||
if (m_running) return; // return if running already
|
||||
|
||||
m_startWaitMutex.lock();
|
||||
start();
|
||||
while(!m_running)
|
||||
@@ -45,6 +47,8 @@ void LimeSDRInputThread::startWork()
|
||||
|
||||
void LimeSDRInputThread::stopWork()
|
||||
{
|
||||
if (!m_running) return; // return if not running
|
||||
|
||||
m_running = false;
|
||||
wait();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user