From: Eric Wong Date: 2013-09-07T20:16:32+00:00 Subject: [ruby-core:57063] Re: [ruby-trunk - Bug #8875] Select is not usable with SSLSocket "headius (Charles Nutter)" wrote: > However, the buffering issue is harder to fix. I believe buffering.rb > needs to go away entirely, or at least needs to not buffer data on its > own. I think so, too. I believe any sort of explicit buffering by Ruby on socket/pipe wrappers is wrong and only leads to surprising behavior and bugs. Anyways, I'm not sure if read/readpartial/write for IO.select should ever be recommended. select() manpage in Linux recommends using O_NONBLOCK for all I/O operations because of spurious wakeups, too. So perhaps we should only be doing the _nonblock variants anyways. (Also, consider the multi-threaded case where several threads are all doing select + (recvmsg|accept) on the same shared socket)