nio4r icon indicating copy to clipboard operation
nio4r copied to clipboard

Windows Build

Open cfis opened this issue 4 years ago • 3 comments

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?

cfis avatar Jan 22 '22 08:01 cfis

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

MSP-Greg avatar Jan 22 '22 15:01 MSP-Greg

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

tarcieri avatar Jan 22 '22 18:01 tarcieri

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

cfis avatar Jan 23 '22 08:01 cfis