fixed race codition between RouterInfo's buffer persist and update

This commit is contained in:
orignal 2024-05-08 19:09:03 -04:00
parent 425ef2cfe5
commit b98b3a87b0
4 changed files with 52 additions and 32 deletions

View file

@ -146,7 +146,7 @@ namespace data
void Load ();
bool LoadRouterInfo (const std::string& path, uint64_t ts);
void SaveUpdated ();
void PersistRouters (std::list<std::pair<std::string, std::shared_ptr<RouterInfo> > >&& update,
void PersistRouters (std::list<std::pair<std::string, std::shared_ptr<RouterInfo::Buffer> > >&& update,
std::list<std::string>&& remove);
void Run (); // exploratory thread
void Explore (int numDestinations);