kazuho/h2o — pull request #23 by kazuho (2014-09-25 07:01:05+00:00)
Title: implement max_connections

This PR tackles #20 by doing the following:

- add configuration directive `max-connections`
- observes the number of connections
- starts / stops accepting new connections by checking the number of connections
- uses `pthread_kill` to exit from blocking call to `epoll` et. al. when it is necessary to start accepting new connections
- accepts at max. 16 new connections per loop
- may improve performance when non-persistent connections are used, though we need to apply things like DATAREADY and read-before-select as well (#15)