From 64e3cd1211b94051576b461682280a5b01b123e0 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 13 Jun 2012 12:48:02 -0700 Subject: usb: prefer to stop the task explicitly --- host/lib/transport/usb_zero_copy_wrapper.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'host/lib') diff --git a/host/lib/transport/usb_zero_copy_wrapper.cpp b/host/lib/transport/usb_zero_copy_wrapper.cpp index 843b20f11..d59ea36ff 100644 --- a/host/lib/transport/usb_zero_copy_wrapper.cpp +++ b/host/lib/transport/usb_zero_copy_wrapper.cpp @@ -87,6 +87,12 @@ public: _task = uhd::task::make(boost::bind(&usb_zero_copy_wrapper_msb::auto_flush, this)); } + ~usb_zero_copy_wrapper_msb(void) + { + //ensure the task has exited before anything auto deconstructs + _task.reset(); + } + void release(void){ boost::mutex::scoped_lock lock(_mutex); _ok_to_auto_flush = true; -- cgit v1.2.3