mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 16:00:08 +00:00
Avoid uncommon race condition with computing a sweep during radar product view destruction
This commit is contained in:
parent
f56d7f14bf
commit
bb2d3a92ad
8 changed files with 37 additions and 7 deletions
|
|
@ -41,13 +41,15 @@ public:
|
|||
{
|
||||
coordinates_.resize(kMaxCoordinates_);
|
||||
}
|
||||
~Level3RadialViewImpl() = default;
|
||||
~Level3RadialViewImpl() { threadPool_.join(); };
|
||||
|
||||
void ComputeCoordinates(
|
||||
std::shared_ptr<wsr88d::rpg::GenericRadialDataPacket> radialData);
|
||||
|
||||
Level3RadialView* self_;
|
||||
|
||||
boost::asio::thread_pool threadPool_ {1u};
|
||||
|
||||
std::vector<float> coordinates_ {};
|
||||
std::vector<float> vertices_ {};
|
||||
std::vector<std::uint8_t> dataMoments8_ {};
|
||||
|
|
@ -73,6 +75,11 @@ Level3RadialView::~Level3RadialView()
|
|||
std::unique_lock sweepLock {sweep_mutex()};
|
||||
}
|
||||
|
||||
boost::asio::thread_pool& Level3RadialView::thread_pool()
|
||||
{
|
||||
return p->threadPool_;
|
||||
}
|
||||
|
||||
float Level3RadialView::range() const
|
||||
{
|
||||
return p->range_;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue