The current implementation spawns and detaches a new thread for every connection, making it extremely intensive and prone to resource exhaustion under load. It would be better to have a fixed pool of long running threads all simultaneously waiting on the listener socket, with each thread adding its share of incoming connections to a local connection list monitored via select/epoll/kqueue/IOCP.
The current implementation spawns and detaches a new thread for every connection, making it extremely intensive and prone to resource exhaustion under load. It would be better to have a fixed pool of long running threads all simultaneously waiting on the listener socket, with each thread adding its share of incoming connections to a local connection list monitored via select/epoll/kqueue/IOCP.