From: Tanaka Akira Date: 2005-12-17T12:24:18+09:00 Subject: Re: nonblocking TCPSocket in multithread software. In article <8764poo4tq.fsf@dessyku.is-a-geek.org>, Yohanes Santoso writes: > I expect it to block. All IO's buffered I/O methods (puts, prints, read, write, > etc.) are blocking operations. Agreed. > The utility of nonblock comes if you use unbuffered I/O methods: > sysread, syswrite, recv, send, etc. Unfortunately they blocks if there are multiple threads. Apart from that syswrite (and other unbuffered writing methods) blocks unless O_NONBLOCK. Formar problem can be solved by IO.select. Later problem can be solved by O_NONBLOCK. I think it is useful that some utility nonblocking methods to care above issues automatically. However it is quite difficult to propose method names which matz accept. -- Tanaka Akira