mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
persist local RouterInfo in separate thread using seperate buffer
This commit is contained in:
parent
93ec5ac5c4
commit
e4ba07a540
2 changed files with 38 additions and 1 deletions
|
@ -13,6 +13,7 @@
|
|||
#include <string>
|
||||
#include <memory>
|
||||
#include <random>
|
||||
#include <future>
|
||||
#include <unordered_set>
|
||||
#include <boost/asio.hpp>
|
||||
#include "Identity.h"
|
||||
|
@ -266,6 +267,9 @@ namespace garlic
|
|||
bool m_IsHiddenMode; // not publish
|
||||
mutable std::mutex m_RouterInfoMutex;
|
||||
std::mt19937 m_Rng;
|
||||
std::future<void> m_SavingRouterInfo;
|
||||
std::shared_ptr<i2p::data::RouterInfo::Buffer> m_SaveBuffer;
|
||||
std::mutex m_SaveBufferMutex; // TODO: make m_SaveBuffer atomic
|
||||
};
|
||||
|
||||
extern RouterContext context;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue