Avoid uncommon race condition with computing a sweep during radar product view destruction

This commit is contained in:
Dan Paulat 2023-11-05 07:52:27 -06:00
parent f56d7f14bf
commit bb2d3a92ad
8 changed files with 37 additions and 7 deletions

View file

@ -30,7 +30,9 @@ public:
latitude_ {}, longitude_ {}, range_ {}, vcp_ {}, sweepTime_ {}
{
}
~Level3RasterViewImpl() = default;
~Level3RasterViewImpl() { threadPool_.join(); };
boost::asio::thread_pool threadPool_ {1u};
std::vector<float> vertices_;
std::vector<uint8_t> dataMoments8_;
@ -56,6 +58,11 @@ Level3RasterView::~Level3RasterView()
std::unique_lock sweepLock {sweep_mutex()};
}
boost::asio::thread_pool& Level3RasterView::thread_pool()
{
return p->threadPool_;
}
float Level3RasterView::range() const
{
return p->range_;