srsue,phy: change stop order to avoid locking

master
Ismael Gomez 3 years ago
parent be5c3afc51
commit 08b20ba4b2

@ -128,14 +128,14 @@ sync::~sync()
void sync::stop() void sync::stop()
{ {
running = false;
wait_thread_finish();
std::lock_guard<std::mutex> lock(intra_freq_cfg_mutex); std::lock_guard<std::mutex> lock(intra_freq_cfg_mutex);
worker_com->semaphore.wait_all(); worker_com->semaphore.wait_all();
for (auto& q : intra_freq_meas) { for (auto& q : intra_freq_meas) {
q->stop(); q->stop();
} }
running = false;
wait_thread_finish();
// Reset (stop Rx stream) as soon as possible to avoid base-band Rx buffer overflow // Reset (stop Rx stream) as soon as possible to avoid base-band Rx buffer overflow
radio_h->reset(); radio_h->reset();

Loading…
Cancel
Save