From 6390673137955a158ac3a8082d7f47ff4a03c7fd Mon Sep 17 00:00:00 2001 From: NanoAkron Date: Mon, 3 Oct 2016 02:06:55 +0100 Subject: Removed all code related to fast_exit --- contrib/epee/include/net/abstract_tcp_server2.h | 1 - contrib/epee/include/net/abstract_tcp_server2.inl | 14 +------------- 2 files changed, 1 insertion(+), 14 deletions(-) (limited to 'contrib/epee/include/net') diff --git a/contrib/epee/include/net/abstract_tcp_server2.h b/contrib/epee/include/net/abstract_tcp_server2.h index cb387d39f..f0a1ddd7c 100644 --- a/contrib/epee/include/net/abstract_tcp_server2.h +++ b/contrib/epee/include/net/abstract_tcp_server2.h @@ -300,7 +300,6 @@ namespace net_utils boost::thread::id m_main_thread_id; critical_section m_threads_lock; volatile uint32_t m_thread_index; // TODO change to std::atomic - void detach_threads(); t_connection_type m_connection_type; diff --git a/contrib/epee/include/net/abstract_tcp_server2.inl b/contrib/epee/include/net/abstract_tcp_server2.inl index 94dbe7458..dbdfbc74d 100644 --- a/contrib/epee/include/net/abstract_tcp_server2.inl +++ b/contrib/epee/include/net/abstract_tcp_server2.inl @@ -827,7 +827,7 @@ POP_WARNINGS } CRITICAL_REGION_END(); // Wait for all threads in the pool to exit. - if (wait) // && ! ::cryptonote::core::get_is_stopping()) // TODO fast_exit + if (wait) { _fact("JOINING all threads"); for (std::size_t i = 0; i < m_threads.size(); ++i) { @@ -897,10 +897,6 @@ POP_WARNINGS template void boosted_tcp_server::send_stop_signal() { - if (::cryptonote::core::get_fast_exit() == true) - { - detach_threads(); - } m_stop_signal_sent = true; TRY_ENTRY(); connections_mutex.lock(); @@ -1144,14 +1140,6 @@ POP_WARNINGS return true; CATCH_ENTRY_L0("boosted_tcp_server::connect_async", false); } - //--------------------------------------------------------------------------------- - template - void boosted_tcp_server::detach_threads() - { - for (auto thread : m_threads) - thread->detach(); - } - } // namespace } // namespace -- cgit v1.2.3