In Listing 1, the call to select blocks until the server either receives a new client or detects available bytes being written to an open socket.
在清单1中,在服务器接收新客户机或检测到正把可用的字节写到打开的socket前,select的调用阻塞了。
Worse, Select() clobbers the caller’s arguments if it times out and no socket is ready: the caller needs to make a copy of the three lists on each iteration even if nothing happens!
更有甚者,如果没有socket就绪而发生超时,那么该方法就会销毁调用者传入的参数,所以就算是什么事情都没有发生,调用者还是必须要在每一个循环中对这三个列表进行备份!
应用推荐