mirror of
https://github.com/SChernykh/p2pool.git
synced 2024-08-18 20:48:46 -06:00
Removed unnecessary lock
This commit is contained in:
parent
20b3886bfb
commit
d4388bf9c0
@ -103,9 +103,6 @@ BlockTemplate& BlockTemplate::operator=(const BlockTemplate& b)
|
|||||||
|
|
||||||
WriteLock lock(m_lock);
|
WriteLock lock(m_lock);
|
||||||
|
|
||||||
// b.m_lock should already be locked here, but try to lock it for reading anyway
|
|
||||||
const int lock_result = uv_rwlock_tryrdlock(&b.m_lock);
|
|
||||||
|
|
||||||
m_pool = b.m_pool;
|
m_pool = b.m_pool;
|
||||||
m_templateId = b.m_templateId;
|
m_templateId = b.m_templateId;
|
||||||
m_blockTemplateBlob = b.m_blockTemplateBlob;
|
m_blockTemplateBlob = b.m_blockTemplateBlob;
|
||||||
@ -139,10 +136,6 @@ BlockTemplate& BlockTemplate::operator=(const BlockTemplate& b)
|
|||||||
m_knapsack.clear();
|
m_knapsack.clear();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (lock_result == 0) {
|
|
||||||
uv_rwlock_rdunlock(&b.m_lock);
|
|
||||||
}
|
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user