In article <00f801c5aeb2$df9c47a0$6442a8c0@musicbox>,
  "Bill Kelly" <billk / cts.com> writes:

> Right... For the program I'm writing right now, if I were
> using threads, what I'd like is to have is multiple
> pairs of threads--a read thread doing
>
>   sock.gets()
>
> and a write thread doing
>
>   sock.puts(line)
>
> ... but I'm afraid the #puts will block my whole process,
> potentially. . . . So I can break that down into select()
> and send() with NONBLOCK ... But then I'm afraid to use
> puts() on the same socket, because I fear mixing high-level
> gets/puts with low-level send/recv...  So I presume I need
> to break both threads into select() and send/recv...

I can understand the fear.  However I'm not sure how it can be
eliminated.  Some documenatation might help.

> So - I don't know.  One thing I'm sure of is that if Ruby
> handled nonblocking better behind the scenes, network 
> programming in ruby could be as much of a joy as most other
> ruby programming is.

I'm trying.

> Is this new?  I don't seem to have File::NONBLOCK in my
> ruby 1.8.2 (2004-12-25) [i386-mswin32]

I'm not sure.  Maybe after that.
-- 
Tanaka Akira