We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7c7d10e commit 2a17735Copy full SHA for 2a17735
1 file changed
common/objectcachev2.h
@@ -38,7 +38,7 @@ class ObjectCacheV2 {
38
const K key;
39
std::shared_ptr<V> ref;
40
// prevent create multiple time when borrow
41
- photon::spinlock createlock;
+ photon::mutex createlock{0};
42
// create timestamp, for cool-down of borrow
43
uint64_t lastcreate = 0;
44
// reclaim timestamp
@@ -83,7 +83,7 @@ class ObjectCacheV2 {
83
};
84
85
// protect object cache map
86
- photon::spinlock maplock;
+ photon::mutex maplock{0};
87
// protect lru list
88
std::unordered_set<Box, BoxHash, BoxEqual> map;
89
intrusive_list<Box> lru_list;
0 commit comments