From 10573261c21b307324fff1e107d401da592bd16c Mon Sep 17 00:00:00 2001 From: Dimitri Stolnikov Date: Wed, 16 Jan 2013 20:30:37 +0100 Subject: [PATCH] rtl: notify work function on exit of async read this is required to handle the interruption of a flowgraph in a clean way by returning WORK_DONE in work() function. --- lib/rtl/rtl_source_c.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/rtl/rtl_source_c.cc b/lib/rtl/rtl_source_c.cc index f6e7a94..302c993 100644 --- a/lib/rtl/rtl_source_c.cc +++ b/lib/rtl/rtl_source_c.cc @@ -302,6 +302,8 @@ void rtl_source_c::rtlsdr_wait() if ( ret != 0 ) std::cerr << "rtlsdr_read_async returned with " << ret << std::endl; + + _buf_cond.notify_one(); } int rtl_source_c::work( int noutput_items,