mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11: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:
@@ -21,6 +21,19 @@ class IEntryNotifier {
|
||||
IEntryNotifier& operator=(const IEntryNotifier&) = delete;
|
||||
virtual ~IEntryNotifier() = default;
|
||||
virtual bool local_notifiers() const = 0;
|
||||
|
||||
virtual unsigned int Add(
|
||||
std::function<void(const EntryNotification& event)> callback,
|
||||
llvm::StringRef prefix, unsigned int flags) = 0;
|
||||
virtual unsigned int Add(
|
||||
std::function<void(const EntryNotification& event)> callback,
|
||||
unsigned int local_id, unsigned int flags) = 0;
|
||||
virtual unsigned int AddPolled(unsigned int poller_uid,
|
||||
llvm::StringRef prefix,
|
||||
unsigned int flags) = 0;
|
||||
virtual unsigned int AddPolled(unsigned int poller_uid, unsigned int local_id,
|
||||
unsigned int flags) = 0;
|
||||
|
||||
virtual void NotifyEntry(unsigned int local_id, StringRef name,
|
||||
std::shared_ptr<Value> value, unsigned int flags,
|
||||
unsigned int only_listener = UINT_MAX) = 0;
|
||||
|
||||
Reference in New Issue
Block a user