RemoteTagCache: use IntrusiveHashSet instead of boost::intrusive::unordered_set

This commit is contained in:
Max Kellermann
2022-11-11 21:23:47 +01:00
parent c943e27d51
commit a43062c575
2 changed files with 8 additions and 14 deletions

View File

@@ -25,8 +25,7 @@
#include "event/InjectEvent.hxx"
#include "thread/Mutex.hxx"
#include "util/IntrusiveList.hxx"
#include <boost/intrusive/unordered_set.hpp>
#include "util/IntrusiveHashSet.hxx"
#include <string>
@@ -45,7 +44,7 @@ class RemoteTagCache final {
Mutex mutex;
struct Item final
: public boost::intrusive::unordered_set_base_hook<boost::intrusive::link_mode<boost::intrusive::normal_link>>,
: public IntrusiveHashSetHook<>,
public IntrusiveListHook<>,
RemoteTagHandler
{
@@ -113,12 +112,9 @@ class RemoteTagCache final {
*/
ItemList invoke_list;
typedef boost::intrusive::unordered_set<Item,
boost::intrusive::hash<Item::Hash>,
boost::intrusive::equal<Item::Equal>,
boost::intrusive::constant_time_size<true>> KeyMap;
std::array<typename KeyMap::bucket_type, 127> buckets;
using KeyMap = IntrusiveHashSet<Item, 127, Item::Hash, Item::Equal,
IntrusiveHashSetBaseHookTraits<Item>,
true>;
KeyMap map;