Make speculative accept() faster for the common case
commitbe1542f47f0ea4cfb93a7b8dd5e94627f4a8b51f
authorEric Wong <normalperson@yhbt.net>
Sun, 3 May 2009 06:44:52 +0000 (2 23:44 -0700)
committerEric Wong <normalperson@yhbt.net>
Sun, 3 May 2009 06:50:34 +0000 (2 23:50 -0700)
treeabd75bc652776ad47da4f8473f7f92aa6b7473ac
parent83ab6d80792e5abc37c59a56a31be9433ecdd911
Make speculative accept() faster for the common case

Only do speculative accept on the previous ready set of
listeners.  This makes it less CPU-intensive to have per-process
debug listeners configured.

Unfortunately, this makes non-primary listeners unable to accept
connections if the server is under extremely heavy load and
speculative accept() on the previous listener is always
succeeding and hogging the process.  Fortunately, this is an
uncommon case.
lib/unicorn.rb