From: James Edward Gray II Date: 2006-05-02T01:01:03+09:00 Subject: Re: Multiplexed I/O On May 1, 2006, at 10:27 AM, Robert Klemme wrote: > 2006/5/1, James Edward Gray II : >> On May 1, 2006, at 1:44 AM, Minkoo Seo wrote: >> >> > I can't understand this. If ruby uses non native multithreading, >> then >> > all threads will run in the same process. And that implies that one >> > blocking I/O operation stop the all threads in the ruby interpreter >> > process, doesn't it? >> >> I'm pretty sure Ruby selects over sockets under the hood, to keep the >> interpreter from blocking. I don't believe that's a perfect solution >> those as something like a large write could still block the process. > > Theoretically yes, but in practice this works pretty well. Could even > be that large writes are split up by the Ruby engine. I can remember at least one post from a person who ran into this exact issue. Bill Kelly also just followed up with a post about the effort being made to tie in nonblocking operations to improve this issue. I believe that's the recommended Ruby socket handling method. I know I've seen it suggested here more than once. To me, these are signs that a simple select call doesn't work as well as we would like it to. James Edward Gray II