Skip to content

Commit

Permalink
using sharable_lock for cache get size
Browse files Browse the repository at this point in the history
  • Loading branch information
abushev committed Jun 15, 2024
1 parent dc6e892 commit 29be57b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rtb/datacache/entity_cache.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ class entity_cache
}

size_t get_size() const {
bip::scoped_lock<bip::named_upgradable_mutex> guard(_named_mutex) ;
bip::sharable_lock<bip::named_upgradable_mutex> guard(_named_mutex) ;
return _container_ptr->size();
}
private:
Expand Down

0 comments on commit 29be57b

Please sign in to comment.