On 30 October 2012 16:20, John Merlino
<stoicism1-YDxpq3io04c@public.gmane.org> wrote:> I come across this method:
>
> read(n=nil, buffer=nil) – read n bytes (or fewer, if EOF is reached),
> blocking if necessary, until the bytes are ready.
>
> What does it mean "blocking if necessary"? Blocking what?
It means that if it is reading from a keyboard for example it will
wait (block) for data to be input if there is nothing available. A
non-blocking read will just pick up whatever data is available and
immediately return.
Colin
>
> --
> You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
> To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.