diff --git a/a8/asiotcpclient.cc b/a8/asiotcpclient.cc index cd949d1..9d7d8c7 100644 --- a/a8/asiotcpclient.cc +++ b/a8/asiotcpclient.cc @@ -87,20 +87,6 @@ namespace a8 void AsioTcpClient::SetActive(bool active) { - if (active) { - if (IsActive()) { - return; - } - if (worker_thread_) { - ActiveStop(); - } - worker_thread_shutdown_ = false; - worker_thread_ = new std::thread(&AsioTcpClient::WorkerThreadProc, this); - } else { - if (worker_thread_) { - ActiveStop(); - } - } } bool AsioTcpClient::ActiveStart() @@ -113,14 +99,6 @@ namespace a8 connected_ = false; } - void AsioTcpClient::WorkerThreadProc() - { - } - - void AsioTcpClient::SenderThreadProc() - { - } - void AsioTcpClient::NotifySendCond() { std::unique_lock lk(*send_cond_mutex_); diff --git a/a8/asiotcpclient.h b/a8/asiotcpclient.h index 061efe8..3f03ac9 100644 --- a/a8/asiotcpclient.h +++ b/a8/asiotcpclient.h @@ -30,9 +30,6 @@ namespace a8 std::shared_ptr resolver_; std::shared_ptr socket_; volatile bool connected_ = false; - volatile bool sender_thread_shutdown_ = false; - volatile bool worker_thread_shutdown_ = false; - std::thread* worker_thread_ = nullptr; std::mutex* send_buffer_mutex_ = nullptr; SendQueueNode *top_node_ = nullptr; SendQueueNode *bot_node_ = nullptr; @@ -42,8 +39,6 @@ namespace a8 void SetActive(bool active); bool ActiveStart(); void ActiveStop(); - void WorkerThreadProc(); - void SenderThreadProc(); void NotifySendCond(); };