mirror of
https://github.com/hoytech/strfry.git
synced 2025-06-16 16:28:50 +00:00
Monitors can't be stored in flat maps because we manage pointers into them in MonitorSets
This commit is contained in:
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <unordered_map>
|
||||
|
||||
#include "golpe.h"
|
||||
|
||||
#include "Subscription.h"
|
||||
@ -13,9 +15,10 @@ struct ActiveMonitors : NonCopyable {
|
||||
Subscription sub;
|
||||
|
||||
Monitor(Subscription &sub_) : sub(std::move(sub_)) {}
|
||||
Monitor(const Monitor&) = delete; // pointers to filters inside sub must be stable because they are stored in MonitorSets
|
||||
};
|
||||
|
||||
using ConnMonitor = flat_hash_map<SubId, Monitor>;
|
||||
using ConnMonitor = std::unordered_map<SubId, Monitor>;
|
||||
flat_hash_map<uint64_t, ConnMonitor> conns; // connId -> subId -> Monitor
|
||||
|
||||
struct MonitorItem {
|
||||
|
Reference in New Issue
Block a user