From: James Edward Gray II Date: 2004-10-05T01:10:48+09:00 Subject: Re: Thinking about Threaded IO On Oct 4, 2004, at 3:39 AM, Brian Candler wrote: > On Mon, Oct 04, 2004 at 07:42:14AM +0900, David G. Andersen wrote: >> >> The former caused (all of) Ruby to block. The latter >> was handled properly. I _assume_, but didn't verify, >> that this is because Ruby was doing something like >> >> select() >> read(foo) >> >> internally > > Essentially that's right. Was there any reason to use 'sysread' rather > than > 'read'? I think that > > mybuf.sbuf += s.read(65536) > > probably would have worked as you'd expected. So with a big read, you can still hang waiting for the bytes? Are you suggesting read()) would have handled this better than sysread()? Where does that leave gets()? Thanks. James Edward Gray II