mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
Move immediate entry notification logic into Storage.
This prevents a race condition that could result in out of order notifications.
This commit is contained in:
@@ -100,6 +100,20 @@ class Storage : public IStorage {
|
||||
std::vector<EntryInfo> GetEntryInfo(int inst, StringRef prefix,
|
||||
unsigned int types);
|
||||
|
||||
unsigned int AddListener(
|
||||
StringRef prefix,
|
||||
std::function<void(const EntryNotification& event)> callback,
|
||||
unsigned int flags) const;
|
||||
unsigned int AddListener(
|
||||
unsigned int local_id,
|
||||
std::function<void(const EntryNotification& event)> callback,
|
||||
unsigned int flags) const;
|
||||
|
||||
unsigned int AddPolledListener(unsigned int poller_uid, StringRef prefix,
|
||||
unsigned int flags) const;
|
||||
unsigned int AddPolledListener(unsigned int poller_uid, unsigned int local_id,
|
||||
unsigned int flags) const;
|
||||
|
||||
// Index-only
|
||||
unsigned int GetEntry(StringRef name);
|
||||
std::vector<unsigned int> GetEntries(StringRef prefix, unsigned int types);
|
||||
|
||||
Reference in New Issue
Block a user