void TcpServer::removeConnectionInLoop(const TcpConnectionPtr& conn) { _loop->assertInLoopThread(); size_t n = _connections.erase(conn->name()); (void)n; assert(n == 1); EventLoop* ioLoop = conn->getLoop(); ioLoop->queueInLoop( std::bind(&TcpConnection::connectDestroyed, conn)); }
void TcpServer::removeConnectionInLoop(const TcpConnectionPtr& conn) { m_loop->assertInLoopThread(); LOG_INFO << "TcpServer::removeConnectionInLoop [" << m_name << "] - connection " << conn->name(); size_t n = connections_.erase(conn->name()); (void)n; assert(n == 1); EventLoop* ioLoop = conn->getLoop(); ioLoop->queueInLoop( boost::bind(&TcpConnection::connectDestroyed, conn)); }
void TcpServer::removeConnectionInLoop(const TcpConnectionPtr& conn) { loop_->assertInLoopThread(); LOG_PRINT(LogType_Info, "TcpServer::removeConnectionInLoop [%s] - connection %s", name_.c_str(), conn->name().c_str()); size_t n = connections_.erase(conn->name()); (void)n; assert(n == 1); EventLoop* loop = conn->getLoop(); loop->queueInLoop( std::bind(&TcpConnection::connectDestroyed, conn)); }