aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoinrpc.cpp
diff options
context:
space:
mode:
authorAlexander Kjeldaas <[email protected]>2012-11-11 03:11:13 -0300
committerAlexander Kjeldaas <[email protected]>2012-11-14 00:00:23 -0300
commitbfc96207998c284e2cb6eb99c99b755a161e723d (patch)
tree205ae4cdb170e1fbb30a8891dbac4d5db622d499 /src/bitcoinrpc.cpp
parentMerge pull request #1979 from sipa/corefndoc (diff)
downloaddiscoin-bfc96207998c284e2cb6eb99c99b755a161e723d.tar.xz
discoin-bfc96207998c284e2cb6eb99c99b755a161e723d.zip
Simplify CMutexLock
o Remove unused Leave and GetLock functions o Make Enter and TryEnter private. o Simplify Enter and TryEnter. boost::unique_lock doesn't really know whether the mutex it wraps is locked or not when the defer_lock option is used. The boost::recursive_mutex does not expose this information, so unique_lock only infers this knowledge. When taking the lock is defered, it (randomly) assumes that the lock is not taken. boost::unique_lock has the following definition: unique_lock(Mutex& m_,defer_lock_t): m(&m_),is_locked(false) {} bool owns_lock() const { return is_locked; } Thus it is a mistake to check owns_lock() in Enter and TryEnter - they will always return false.
Diffstat (limited to 'src/bitcoinrpc.cpp')
0 files changed, 0 insertions, 0 deletions