Protect controller list updates with mutex

This commit is contained in:
Adam Honse 2020-09-30 22:45:03 -05:00
parent fde002707a
commit 716b2aaac3
2 changed files with 70 additions and 4 deletions

View file

@ -65,6 +65,8 @@ public:
std::vector<RGBController *> server_controllers;
std::mutex ControllerListMutex;
protected:
std::vector<RGBController *>& controllers;
@ -81,6 +83,7 @@ private:
bool server_initialized;
unsigned int server_controller_count;
bool server_controller_count_received;
bool change_in_progress;
std::thread * ConnectionThread;
std::thread * ListenThread;