mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +00:00
NetworkTable: Protect listeners with mutex.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#ifndef _NETWORKTABLE_H_
|
||||
#define _NETWORKTABLE_H_
|
||||
|
||||
#include <mutex>
|
||||
#include <vector>
|
||||
|
||||
#include "tables/ITable.h"
|
||||
@@ -10,6 +11,7 @@ class NetworkTable : public ITable {
|
||||
struct private_init {};
|
||||
|
||||
std::string m_path;
|
||||
std::mutex m_mutex;
|
||||
typedef std::pair<ITableListener*, unsigned int> Listener;
|
||||
std::vector<Listener> m_listeners;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user