Bug/30 server connection problem (#31)

* use threads instead of std::async, need to cleanup threads

* less buggy server connection per thread system
This commit is contained in:
Benjamin Sergeant
2019-04-16 22:19:44 -07:00
committed by GitHub
parent b0f6026c23
commit bdfc55b951
2 changed files with 13 additions and 11 deletions

View File

@ -12,6 +12,7 @@
#include <string>
#include <set>
#include <thread>
#include <vector>
#include <mutex>
#include <functional>
#include <memory>
@ -63,6 +64,8 @@ namespace ix
std::atomic<bool> _stop;
std::thread _thread;
std::vector<std::thread> _connectionsThreads;
std::condition_variable _conditionVariable;
std::mutex _conditionVariableMutex;