atomics have been used for threads stop

This commit is contained in:
brain5lug 2017-10-01 00:46:49 +03:00
parent 8c09a7429c
commit dfa1482ab2
15 changed files with 259 additions and 212 deletions

View file

@ -8,6 +8,7 @@
#include <thread>
#include <boost/asio.hpp>
#include <sstream>
#include <atomic>
#include "HTTP.h"
namespace i2p
@ -70,7 +71,7 @@ namespace http
private:
bool m_IsRunning;
std::atomic_bool m_IsRunning;
std::unique_ptr<std::thread> m_Thread;
boost::asio::io_service m_Service;
boost::asio::io_service::work m_Work;