Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Fiber::Scheduler#io_pwrite
io_pwrite(io, buffer, from, length, offset) → written length or -errno
scheduler.c
View on GitHub ↗
VALUE
rb_fiber_scheduler_io_pwrite(VALUE scheduler, VALUE io, rb_off_t from, VALUE buffer, size_t length, size_t offset)
{
VALUE arguments[] = {
io, buffer, OFFT2NUM(from), SIZET2NUM(length), SIZET2NUM(offset)
};
return rb_check_funcall(scheduler, id_io_pwrite, 5, arguments);
}
Invoked by IO#pwrite or IO::Buffer#pwrite to write length bytes to io at offset from into a specified buffer (see IO::Buffer) at the given offset.
This method is semantically the same as io_write, but it allows to specify the offset to write to and is often better for asynchronous IO on the same file.
The method should be considered experimental.