Skip to content
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

Bad file descriptor on Windows #2

Open
spazer5 opened this issue Apr 4, 2022 · 0 comments
Open

Bad file descriptor on Windows #2

spazer5 opened this issue Apr 4, 2022 · 0 comments

Comments

@spazer5
Copy link

spazer5 commented Apr 4, 2022

Awesome project! I tried the Async gem but currently it's not supported on Windows due to io-event gem, so i gave this one a try and ran into an error.

Environment:

  • Windows 10
  • Ruby 3.1.1p18 (2022-02-18 revision 53f5fc4236) [x64-mingw-ucrt] installed via (RailsInstaller)

Getting an error

<internal:io>:63:in `read_nonblock': Bad file descriptor @ rb_io_set_nonblock - C:/Windows/System32/drivers/etc/hosts (Errno::EBADF)

Reproduction:

require 'fiber_scheduler'
require 'open-uri'

FiberScheduler do
  Fiber.schedule { URI.open('http://ip.me') }
  Fiber.schedule { URI.open('http://ip.me') }
end

I tried a different scheduler found at the very bottom of this article and it works right away but I'm not sure if it's reliable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant