On Wed, Dec 26, 2007, Erik Huelsmann wrote:
usocket trunk supports a select() like interface to determine which sockets are available for reading. With that code, you could implement the 10 socket readers in 1 thread instead of in 10. The interface returns the sockets which are ready for reading. If the timeout exceeds, an empty list is returned. The interface is called WAIT-FOR-INPUT.
How about wrapping the socket in a gray stream when timeouts are used, and doing WAIT-FOR-INPUT before read operations? That sounds better than changing every place Drakma and Chunga read from sockets.