eventmachine/eventmachine — pull request #420 by macournoyer (2013-03-12 20:16:39+00:00)
Title: Add support for EM.set_simultaneous_accept_count(<int>).

This controls the number of calls to `accept(2)` done in one turn in the loop. The default value is `10`, like before, so it won't change the default behaviour of EM.

The purpose of this it to prevent EM from accepting more connections than it can handle.
My end goal is to set this to `1` in Thin.

Also add EM.get_simultaneous_accept_count to retreive the value.

If necessary, I can port my changes to the Java backend. Let me know.

/cc @raggi