mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
Move immediate connection notification logic into Dispatcher.
This prevents a race condition that could result in out of order notifications.
This commit is contained in:
@@ -20,6 +20,9 @@ class IConnectionNotifier {
|
||||
IConnectionNotifier(const IConnectionNotifier&) = delete;
|
||||
IConnectionNotifier& operator=(const IConnectionNotifier&) = delete;
|
||||
virtual ~IConnectionNotifier() = default;
|
||||
virtual unsigned int Add(
|
||||
std::function<void(const ConnectionNotification& event)> callback) = 0;
|
||||
virtual unsigned int AddPolled(unsigned int poller_uid) = 0;
|
||||
virtual void NotifyConnection(bool connected, const ConnectionInfo& conn_info,
|
||||
unsigned int only_listener = UINT_MAX) = 0;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user