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

Using select but not kqueue on macOS #125

Closed
dsh0416 opened this issue Jan 18, 2017 · 3 comments
Closed

Using select but not kqueue on macOS #125

dsh0416 opened this issue Jan 18, 2017 · 3 comments

Comments

@dsh0416
Copy link

dsh0416 commented Jan 18, 2017

macOS should support kqueue in libev, but it seems to use select when using the selector.
I've checked extconf.rb, it doesn't help even if I disabled the -DEV_USE_SELECT in compile flags.

2.4.0 :001 > require 'nio'
 => true
2.4.0 :002 > NIO::Selector.new.backend
 => :select
@tarcieri
Copy link
Contributor

Please see the libev documentation re: OS X:

http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod#OS_X_AND_DARWIN_BUGS

@tarcieri
Copy link
Contributor

tarcieri commented Jan 18, 2017

That said, I really don't think switching the defaults on OS X makes sense: OS X is most likely going to be used as a development platform, in which case I'd rather maximize having it work "as if it were Linux" than break (by default) with OS X errata as soon as someone tries to select on a non-socket type. The only advantage would be handling a larger number of connections, but are you really handling hundreds/thousands of concurrent connections on OS X?

@dsh0416
Copy link
Author

dsh0416 commented Jan 18, 2017

I was just testing concurrency on macOS, and it seems buggy, so that I opened this issue. Very few people may use it in "production environment", which makes sense that the backend problem doesn't matter.

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

2 participants