cpp_redis/tacopie/sources/network/io_service.cpp
void
io_service::wait_for_removal(const tcp_socket& socket) {
  std::unique_lock<std::mutex> lock(m_tracked_sockets_mtx);

  __TACOPIE_LOG(debug, "waiting for socket removal");

  m_wait_for_removal_condvar.wait(lock, [&]() {
    __TACOPIE_LOG(debug, "socket has been removed");

    return m_tracked_sockets.find(socket.get_fd()) == m_tracked_sockets.end();
  });
}
//!
//! wait until the socket has been effectively removed
//! basically wait until all pending callbacks are executed
//!
wait until the socket has been effectively removed
basically wait until all pending callbacks are executed
wait until the socket has been effectively removed basically wait until all pending callbacks are executed
void
io_service::wait_for_removal(const tcp_socket& socket) {
  std::unique_lock<std::mutex> lock(m_tracked_sockets_mtx);
  __TACOPIE_LOG(debug, "waiting for socket removal");
  m_wait_for_removal_condvar.wait(lock, [&]() {
    __TACOPIE_LOG(debug, "socket has been removed");
    return m_tracked_sockets.find(socket.get_fd()) == m_tracked_sockets.end();
  });
}
void io_service :: wait_for_removal ( const tcp_socket & socket ) { std :: unique_lock < std :: mutex > lock ( m_tracked_sockets_mtx ) ; __TACOPIE_LOG ( debug , " " ) ; m_wait_for_removal_condvar . wait ( lock , [ & ] ( ) { __TACOPIE_LOG ( debug , " " ) ; return m_tracked_sockets . find ( socket . get_fd ( ) ) == m_tracked_sockets . end ( ) ; } ) ; }
wait until the socket has been effectively removed
basically wait until all pending callbacks are executed
wait until the socket has been effectively removed basically wait until all pending callbacks are executed