diff options
author | Steven Koo <steven.koo@ni.com> | 2020-08-10 17:36:45 -0500 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2020-08-11 16:07:40 -0500 |
commit | be5bee81c4116388f6f3626b6ce1089845c4f792 (patch) | |
tree | 071d3a017575b2a43caf95515c74426305b54882 /host/include | |
parent | fc3f91e0cfb77e295673ac04d310ded65863c119 (diff) | |
download | uhd-be5bee81c4116388f6f3626b6ce1089845c4f792.tar.gz uhd-be5bee81c4116388f6f3626b6ce1089845c4f792.tar.bz2 uhd-be5bee81c4116388f6f3626b6ce1089845c4f792.zip |
rfnoc: Resolves streamer/link segfaults on python
This commit resolves a segfault that occurs during teardown. Since
teardown isn't detereministic in python, there were cases where the
graph would destruct before the streamers or links got chance to
cleanup. This would result in a segfault. This change gives the lambda
a shared pointer to the object the callback method is calling on, so
that it won't destruct before being called.
Diffstat (limited to 'host/include')
-rw-r--r-- | host/include/uhd/rfnoc_graph.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/host/include/uhd/rfnoc_graph.hpp b/host/include/uhd/rfnoc_graph.hpp index fabee53c7..e51fc3d83 100644 --- a/host/include/uhd/rfnoc_graph.hpp +++ b/host/include/uhd/rfnoc_graph.hpp @@ -29,7 +29,7 @@ class mb_controller; * session, but also manages the RFNoC blocks on those devices. Only devices * compatible with a modern version of RFNoC can be addressed by this class. */ -class UHD_API rfnoc_graph : public uhd::noncopyable +class UHD_API rfnoc_graph : public uhd::noncopyable, public std::enable_shared_from_this<rfnoc_graph> { public: /*! A shared pointer to allow easy access to this class and for |