diff options
author | Josh Blum <josh@joshknows.com> | 2012-06-13 12:48:02 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2012-06-13 12:48:02 -0700 |
commit | 64e3cd1211b94051576b461682280a5b01b123e0 (patch) | |
tree | cba96c1a8bfeb452e686e9065edc45cc1ed718bc /host/lib/transport | |
parent | f8bf633965156d937b37a893ae243788413c0c26 (diff) | |
download | uhd-64e3cd1211b94051576b461682280a5b01b123e0.tar.gz uhd-64e3cd1211b94051576b461682280a5b01b123e0.tar.bz2 uhd-64e3cd1211b94051576b461682280a5b01b123e0.zip |
usb: prefer to stop the task explicitly
Diffstat (limited to 'host/lib/transport')
-rw-r--r-- | host/lib/transport/usb_zero_copy_wrapper.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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; |