Fix deadlock in profiling

pull/396/head
Michael 5 years ago
parent a79f27cfd0
commit 8dfe72cbc9
No known key found for this signature in database
GPG Key ID: 2D51757B47E2434C

@ -190,7 +190,6 @@ namespace llarp
if(!profile.BDecode(buf))
return false;
RouterID pk = k.base;
absl::WriterMutexLock l(&m_ProfilesMutex);
return m_Profiles.emplace(pk, profile).second;
}

@ -69,13 +69,14 @@ namespace llarp
MarkPathSuccess(path::Path* p) LOCKS_EXCLUDED(m_ProfilesMutex);
void
Tick();
Tick() LOCKS_EXCLUDED(m_ProfilesMutex);
bool
BEncode(llarp_buffer_t* buf) const override LOCKS_EXCLUDED(m_ProfilesMutex);
bool
DecodeKey(const llarp_buffer_t& k, llarp_buffer_t* buf) override;
DecodeKey(const llarp_buffer_t& k, llarp_buffer_t* buf) override
SHARED_LOCKS_REQUIRED(m_ProfilesMutex);
bool
Load(const char* fname) LOCKS_EXCLUDED(m_ProfilesMutex);

Loading…
Cancel
Save