ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:104481] [Ruby master Feature#18020] Introduce `IO::Buffer` for fiber scheduler.
@ 2021-07-03  7:24 samuel
  2021-07-03  7:24 ` [ruby-core:104482] " samuel
                   ` (29 more replies)
  0 siblings, 30 replies; 31+ messages in thread
From: samuel @ 2021-07-03  7:24 UTC (permalink / raw)
  To: ruby-core

Issue #18020 has been reported by ioquatix (Samuel Williams).

----------------------------------------
Feature #18020: Introduce `IO::Buffer` for fiber scheduler.
https://bugs.ruby-lang.org/issues/18020

* Author: ioquatix (Samuel Williams)
* Status: Open
* Priority: Normal
----------------------------------------
After continuing to build out the fiber scheduler interface and the specific hooks required for `io_uring`, I found some trouble within the implementation of `IO`.

I found that in some cases, we need to read into the `rb_io_buffer_t` struct directly. I tried creating a "fake string" in order to transit back into the Ruby fiber scheduler interface and this did work, but I was told we cannot expose fake string to Ruby code.

So, after this, and many other frustrations with using `String` as a IO buffer, I decided to implement a low level `IO::Buffer` based on my needs for high performance IO, and as part of the fiber scheduler interface. Going forward, this can form the basis of newer interfaces like `IO::Buffer#splice` and so on. We can also add support for `IO#read(n, buffer)` rather than string. This avoids many encoding and alignment issues.

While I'm less interested in the user facing interface at this time, I believe we can introduce it incrementally. Initially my focus is on the interface requirements for the fiber scheduler. Then, I'll look at how we can integrate it more into `IO` directly. The goal is to have this in place for Ruby 3.1.



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2021-11-10 12:24 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-03  7:24 [ruby-core:104481] [Ruby master Feature#18020] Introduce `IO::Buffer` for fiber scheduler samuel
2021-07-03  7:24 ` [ruby-core:104482] " samuel
2021-07-03  8:08 ` [ruby-core:104484] " samuel
2021-07-07 20:25 ` [ruby-core:104538] " samuel
2021-07-08 10:39 ` [ruby-core:104542] " eregontp
2021-07-08 10:55 ` [ruby-core:104544] " samuel
2021-07-08 15:29 ` [ruby-core:104545] " eregontp
2021-07-09  6:47 ` [ruby-core:104556] " samuel
2021-07-09  7:01 ` [ruby-core:104557] " samuel
2021-07-10  3:30 ` [ruby-core:104574] " samuel
2021-07-13 10:35 ` [ruby-core:104593] " eregontp
2021-07-14  0:31 ` [ruby-core:104595] " samuel
2021-09-02 15:31 ` [ruby-core:105120] " dsisnero (Dominic Sisneros)
2021-09-02 15:43 ` [ruby-core:105121] " dsisnero (Dominic Sisneros)
2021-09-04 23:42 ` [ruby-core:105147] " ioquatix (Samuel Williams)
2021-09-04 23:44 ` [ruby-core:105148] " ioquatix (Samuel Williams)
2021-09-14 22:56 ` [ruby-core:105256] " dsisnero (Dominic Sisneros)
2021-09-27  6:16 ` [ruby-core:105440] " ioquatix (Samuel Williams)
2021-09-27  6:40 ` [ruby-core:105441] " ioquatix (Samuel Williams)
2021-09-27  9:44 ` [ruby-core:105443] " Eregon (Benoit Daloze)
2021-10-19  5:11 ` [ruby-core:105669] " ko1 (Koichi Sasada)
2021-10-19  5:30 ` [ruby-core:105670] " ioquatix (Samuel Williams)
2021-10-19 10:27 ` [ruby-core:105676] " Eregon (Benoit Daloze)
2021-10-20  0:50 ` [ruby-core:105686] " ioquatix (Samuel Williams)
2021-10-29  1:26 ` [ruby-core:105862] " ioquatix (Samuel Williams)
2021-11-08  2:35 ` [ruby-core:105963] " matz (Yukihiro Matsumoto)
2021-11-08 21:27 ` [ruby-core:105977] " ioquatix (Samuel Williams)
2021-11-10  6:24 ` [ruby-core:105996] " ioquatix (Samuel Williams)
2021-11-10  8:06 ` [ruby-core:105998] " mame (Yusuke Endoh)
2021-11-10  9:04 ` [ruby-core:106001] " ioquatix (Samuel Williams)
2021-11-10 12:24 ` [ruby-core:106012] " ioquatix (Samuel Williams)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).