mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-03 23:15:52 +00:00
Merge pull request #396 from michael-loki/profiling_thread_safety
Fix deadlock in profiling
This commit is contained in:
commit
d6307cfb2f
@ -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…
Reference in New Issue
Block a user