-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
io_read and io_write should be optional? #2
Comments
Hm, I think they're optional only so they work with fiber schedulers written for ruby 3.0 ( All that said, I'm open to any specific improvements. Maybe we can differentiate specs for ruby 3.0 and 3.1? |
Hmm. They were optional (and undocumented) in It seems that under |
I just spent a lot of time investigating this, but I can't make strong conclusions. I found another place where this hook is called: https://github.com/ruby/ruby/blob/7fe0ebc4e7abd78501094cbb2d47918c8ff29f60/io.c#L1134-L1141 Here's my question regarding I'll try to figure this out. |
Btw. I'm curious about your Fiber Scheduler implementation, is it public? |
It's not done yet, but what I have is public. I'm trying to make one that uses EventMachine (only works on the reactor thread of course) for mix-and-match style in existing EM projects: https://git.sr.ht/~singpolyma/em-fiberscheduler |
I asked Samuel Williams about
My thoughts on the above:
|
Do you mind if I add your fiber scheduler to https://github.com/bruno-/fiber_scheduler_list? |
Sure thing. I've just set up the canonical URL at https://git.singpolyma.net/em_fiberscheduler |
It's my understanding that
io_read
andio_write
are not required in the interface and that there is a fallback if they are not present. However because of how the specs work, the expectation that they be called causes them to be defined, which causes them to be called, and then fails with a confusing error. Maybe these specs could define themselves only if the relevant methods are present?The text was updated successfully, but these errors were encountered: