mirror of
https://github.com/Zygo/bees.git
synced 2025-05-18 13:55:44 +02:00
crucible: cache: no need to use explicit lock type
C++11 'auto' keyword is sufficient. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
parent
b004b22e47
commit
44fedfc928
@ -124,7 +124,7 @@ namespace crucible {
|
|||||||
if (found == m_map.end()) {
|
if (found == m_map.end()) {
|
||||||
// No, release cache lock and acquire key lock
|
// No, release cache lock and acquire key lock
|
||||||
lock.unlock();
|
lock.unlock();
|
||||||
typename LockSet<Key>::Lock key_lock(m_lockset, k);
|
auto key_lock = m_lockset.make_lock(k);
|
||||||
|
|
||||||
// Did item appear in cache while we were waiting for key?
|
// Did item appear in cache while we were waiting for key?
|
||||||
lock.lock();
|
lock.lock();
|
||||||
@ -197,7 +197,7 @@ namespace crucible {
|
|||||||
if (found == m_map.end()) {
|
if (found == m_map.end()) {
|
||||||
// No, release cache lock and acquire key lock
|
// No, release cache lock and acquire key lock
|
||||||
lock.unlock();
|
lock.unlock();
|
||||||
typename LockSet<Key>::Lock key_lock(m_lockset, k);
|
auto key_lock = m_lockset.make_lock(k);
|
||||||
|
|
||||||
// Did item appear in cache while we were waiting for key?
|
// Did item appear in cache while we were waiting for key?
|
||||||
lock.lock();
|
lock.lock();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user