diff options
author | Josh Blum <josh@joshknows.com> | 2012-03-29 11:59:27 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2012-03-29 16:01:52 -0700 |
commit | 7ac203b39c126c4bdb9b2f5494052fd9eea8f21b (patch) | |
tree | 40e0613df526ff96623113e36c802275f1dbffb4 /host/lib/usrp/usrp1/usrp1_impl.cpp | |
parent | 3e8e9dad3c2bdd5e7151956ba9b87142d2cb1435 (diff) | |
download | uhd-7ac203b39c126c4bdb9b2f5494052fd9eea8f21b.tar.gz uhd-7ac203b39c126c4bdb9b2f5494052fd9eea8f21b.tar.bz2 uhd-7ac203b39c126c4bdb9b2f5494052fd9eea8f21b.zip |
usrp1: stop threads in deconstructor
Its important to stop the threads before we let
the other smart point objects naturally deconstruct
to avoid thread-based race conditions.
The attempt to deconstruct the tree and soft time ctrl
had a bug because the tree had references in subtrees
within the dboard manager class.
Rather than continue to fix this method and
deconstruct the tree to free up soft time ctrl,
it seems simpler to just stop the thread in soft time ctrl,
and then let it naturally deconstruct later by ref count.
Diffstat (limited to 'host/lib/usrp/usrp1/usrp1_impl.cpp')
-rw-r--r-- | host/lib/usrp/usrp1/usrp1_impl.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/host/lib/usrp/usrp1/usrp1_impl.cpp b/host/lib/usrp/usrp1/usrp1_impl.cpp index 607badda9..1db2efa0d 100644 --- a/host/lib/usrp/usrp1/usrp1_impl.cpp +++ b/host/lib/usrp/usrp1/usrp1_impl.cpp @@ -413,8 +413,7 @@ usrp1_impl::~usrp1_impl(void){ this->enable_rx(false); this->enable_tx(false); ) - _tree.reset(); //resets counts on sptrs held in tree - _soft_time_ctrl.reset(); //stops cmd task before proceeding + _soft_time_ctrl->stop(); //stops cmd task before proceeding _io_impl.reset(); //stops vandal before other stuff gets deconstructed } |