[#7872] Nonblocking socket-connect — "Francis Cianfrocca" <garbagecat10@...>

All, I needed a nonblocking socket connect for my asynchronous-event

18 messages 2006/05/14
[#7873] Re: Nonblocking socket-connect — Tanaka Akira <akr@...17n.org> 2006/05/14

In article <3a94cf510605140559l7baa0205le341dac4f47d424b@mail.gmail.com>,

[#7874] Re: Nonblocking socket-connect — "Francis Cianfrocca" <garbagecat10@...> 2006/05/15

How about introducing the method Socket#set_nonblocking, or alternatively

[#7875] Re: Nonblocking socket-connect — Yukihiro Matsumoto <matz@...> 2006/05/15

Hi,

[#7876] Re: Nonblocking socket-connect — "Francis Cianfrocca" <garbagecat10@...> 2006/05/15

Well, it's ok then. I'm comfortable adding in the nonblocking

[#7877] Re: Nonblocking socket-connect — Yukihiro Matsumoto <matz@...> 2006/05/15

Hi,

Re: Nonblocking socket-connect

From: "Francis Cianfrocca" <garbagecat10@...>
Date: 2006-05-15 15:42:39 UTC
List: ruby-core #7876
Well, it's ok then. I'm comfortable adding in the nonblocking
functions as an extension in my asynchronous-IO framework. If you
decide it's best to leave nonblocking i/o out of the core, then people
will be able to get it if necessary through my "eventmachine" library.

On 5/15/06, Yukihiro Matsumoto <matz@ruby-lang.org> wrote:
> Hi,
>
> In message "Re: Nonblocking socket-connect"
>     on Mon, 15 May 2006 20:20:12 +0900, "Francis Cianfrocca" <garbagecat10@gmail.com> writes:
>
> |In other words, if we call Socket#nonblocking(true), the behavior of
> |Socket#connect would change to a pure nonblocking behavior. But it would not
> |break any existing code, nor would it introduce of ugly new method names
> |(connect_nonblocking, read_nonblocking, write_nonblocking). Calling
> |Socket#nonblocking( false ) would revert to the original behavior.
>
> require 'io/nonblock' would do what you proposed.  But I'm not
> positive against making it built in, because non-blocking IO can cause
> weird problems so easily under Ruby.  I don't want to encourage using
> them.  Honestly, I want to remove io/nonblock if it's not too late.
>
>                                                         matz.
>
>


In This Thread