diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-04-12 22:59:03 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-04-12 22:59:03 -0700 |
commit | 96c73021c7b41d609fb8335d0ef986ed16bd2dc3 (patch) | |
tree | dd01ba672b9ac03fb9f58480cb5098bdbc4ba9e5 /lib/unicorn/socket.rb | |
parent | fc4bd6c542b6556e746baee5aecadfcd1a591beb (diff) | |
download | unicorn-96c73021c7b41d609fb8335d0ef986ed16bd2dc3.tar.gz |
MRI 1.8 always sets O_NONBLOCK on sockets to implement green threads correctly in the face of slow network I/O. Since we already know what the I/O flags for a client socket should be, we just set it to that instead. Applications running on Unicorn continue to be green thread-safe when used fast local traffic. Of course, Unicorn itself will never use threads.
Diffstat (limited to 'lib/unicorn/socket.rb')
-rw-r--r-- | lib/unicorn/socket.rb | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/unicorn/socket.rb b/lib/unicorn/socket.rb index f0c41cf..5a3bfd7 100644 --- a/lib/unicorn/socket.rb +++ b/lib/unicorn/socket.rb @@ -1,5 +1,4 @@ require 'socket' -require 'io/nonblock' class UNIXSocket UNICORN_PEERADDR = '127.0.0.1'.freeze |