D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Fiber
/
Scheduler
/
Filename :
io_write-i.ri
back
Copy
U:RDoc::AnyMethod[iI" io_write:ETI"Fiber::Scheduler#io_write;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"RInvoked by IO#write or IO::Buffer#write to write +length+ bytes to +io+ from ;TI"Ffrom a specified +buffer+ (see IO::Buffer) at the given +offset+.;To:RDoc::Markup::BlankLine o; ; [ I"LThe +length+ argument is the "minimum length to be written". If the IO ;TI"Rbuffer size is 8KiB, but the +length+ specified is 1024 (1KiB), at most 8KiB ;TI"Pwill be written, but at least 1KiB will be. Generally, the only case where ;TI"Qless data than +length+ will be written is if there is an error writing the ;TI" data.;T@o; ; [I"QSpecifying a +length+ of 0 is valid and means try writing at least once, as ;TI"much data as possible.;T@o; ; [I"LSuggested implementation should try to write to +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"GSee IO::Buffer for an interface available to get data from buffer ;TI"efficiently.;T@o; ; [I"JExpected to return number of bytes written, 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"Fio_write(io, buffer, length, offset) -> written length or -errno ;T0[ I"(p1, p2, p3, p4);T@+FI"Scheduler;TcRDoc::NormalClass00