mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-07 02:36:47 +00:00
Add separate Read/WriteUnlock methods in MutexRW.
Some platforms, particularly Windows, do not have a single method that can release both a held reader lock and a held writer lock; instead, a separate method (ReleaseSRWLockShared or ReleaseSRWLockExclusive) must be called in each case. This may also be necessary to back MutexRW with a shared_mutex in C++14; the current language proposal includes both an unlock() and a shared_unlock() method.
This commit is contained in:
@@ -252,7 +252,7 @@ void VectorRep::Get(const LookupKey& k, void* callback_args,
|
||||
bucket.reset(new Bucket(*bucket_)); // make a copy
|
||||
}
|
||||
VectorRep::Iterator iter(vector_rep, immutable_ ? bucket_ : bucket, compare_);
|
||||
rwlock_.Unlock();
|
||||
rwlock_.ReadUnlock();
|
||||
|
||||
for (iter.Seek(k.user_key(), k.memtable_key().data());
|
||||
iter.Valid() && callback_func(callback_args, iter.key()); iter.Next()) {
|
||||
|
||||
Reference in New Issue
Block a user