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

Windows Build #281

Open
cfis opened this issue Jan 22, 2022 · 3 comments
Open

Windows Build #281

cfis opened this issue Jan 22, 2022 · 3 comments

Comments

@cfis
Copy link

cfis commented Jan 22, 2022

Nio4r builds fine on mingw64 after removing the code to make a dummy make file at the top of extconf.rb. Is there more to it than that, or would it be worth me submitting a patch to remove the special windows handling code?

@MSP-Greg
Copy link
Contributor

Nio4r uses libev, which isn't usable on WIndows?

@tarcieri
Copy link
Contributor

tarcieri commented Jan 22, 2022

libev works on Windows via the select backend. It can’t handle a large number of I/O objects and performs poorly as compared to e.g. IOCP, but the base functionality should still work.

See: http://cvs.schmorp.de/libev/ev_select.c?view=markup

@cfis
Copy link
Author

cfis commented Jan 23, 2022

Note that tests do pass:

Pending: (Failures listed here are expected and do not affect your suite's status)

  1) UDPSocket behaves like an NIO selectable does not select unwritable objects
     # come up with a UDPSocket that's blocked on writing
     Failure/Error: raise TypeError, "can't convert #{io.class} into IO" unless io.is_a? IO

     TypeError:
       can't convert NilClass into IO
     Shared Example Group: "an NIO selectable" called from ./spec/nio/selectables/udp_socket_spec.rb:47
     # ./lib/nio/monitor.rb:19:in `initialize'
     # ./lib/nio/selector.rb:59:in `new'
     # ./lib/nio/selector.rb:59:in `block in register'
     # ./lib/nio/selector.rb:53:in `synchronize'
     # ./lib/nio/selector.rb:53:in `register'
     # ./spec/support/selectable_examples.rb:36:in `block (2 levels) in <top (required)>'

  2) IO.pipe behaves like an NIO selectable does not select unwritable objects
     # windows - can't test due to 'select' not showing correct status
     # ./spec/support/selectable_examples.rb:35


Finished in 8.94 seconds (files took 0.86068 seconds to load)
112 examples, 0 failures, 2 pending

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

3 participants