我有一个go-routine,它正在监听TCP连接并将这些连接发送回主循环的channel。我在go-routine中执行此操作的原因是使此监听成为非阻塞的并且能够同时处理事件连接。我已经使用带有空默认情况的select语句实现了这一点,如下所示:gopollTcpConnections(listener,rawConnections)for{//Checkfornewconnections(non-blocking)select{casetcpConn:=这是我的pollTcpConnections例程:funcpollTcpConnections(listenernet.Liste
我有一个go-routine,它正在监听TCP连接并将这些连接发送回主循环的channel。我在go-routine中执行此操作的原因是使此监听成为非阻塞的并且能够同时处理事件连接。我已经使用带有空默认情况的select语句实现了这一点,如下所示:gopollTcpConnections(listener,rawConnections)for{//Checkfornewconnections(non-blocking)select{casetcpConn:=这是我的pollTcpConnections例程:funcpollTcpConnections(listenernet.Liste