Skip to content

Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →

instance method

Fiber::Scheduler#io_pread

io_pread(io, buffer, from, length, offset) → read length or -errno

Invoked by IO#pread or IO::Buffer#pread to read length bytes from io at offset from into a specified buffer (see IO::Buffer) at the given offset.

This method is semantically the same as io_read, but it allows to specify the offset to read from and is often better for asynchronous IO on the same file.

The method should be considered experimental.

See also #fiber #io_pwrite #close #io_read also in 4.1 · 4.0 · 3.4 · 3.2