D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Fiber
/
Scheduler
/
Filename :
io_read-i.ri
back
Copy
U:RDoc::AnyMethod[iI"io_read:ETI"Fiber::Scheduler#io_read;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"RInvoked by IO#read or IO#Buffer.read to read +length+ bytes from +io+ into a ;TI"?specified +buffer+ (see IO::Buffer) at the given +offset+.;To:RDoc::Markup::BlankLine o; ; [ I"PThe +length+ argument is the "minimum length to be read". If the IO buffer ;TI"Psize is 8KiB, but the +length+ is +1024+ (1KiB), up to 8KiB might be read, ;TI"Nbut at least 1KiB will be. Generally, the only case where less data than ;TI"D+length+ will be read is if there is an error reading the data.;T@o; ; [I"QSpecifying a +length+ of 0 is valid and means try reading at least once and ;TI"return any available data.;T@o; ; [I"MSuggested implementation should try to read from +io+ in a non-blocking ;TI"Qmanner and call #io_wait if the +io+ is not ready (which will yield control ;TI"to other fibers).;T@o; ; [I">See IO::Buffer for an interface available to return data.;T@o; ; [I"GExpected to return number of bytes read, or, in case of an error, ;TI"K<tt>-errno</tt> (negated number corresponding to system's error code).;T@o; ; [I"4The method should be considered _experimental_.;T: @fileI"scheduler.c;T:0@omit_headings_from_table_of_contents_below0I"Bio_read(io, buffer, length, offset) -> read length or -errno ;T0[ I"(p1, p2, p3, p4);T@)FI"Scheduler;TcRDoc::NormalClass00