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

jruby: not properly registering interests for IO coming from ffi(?) #3947

Open
HoneyryderChuck opened this issue Jun 1, 2016 · 1 comment

Comments

@HoneyryderChuck
Copy link

Coming from socketry/nio4r#94 (comment)

Environment

Tested with jruby-9.1.1.0 and nio4r 1.2.1
Under centOS (6.7 release)

If you execute the script shown in the linked issue, you'll see that the ruby IO system successfully registers events for a socket (IO.select). However, once you pass this "customized" IO object down to java land into an NIO channel, this is unable to register events on it.

By custom IO I mean initializing an IO object from an fd. This is common with some libraries imported through FFI which expose the file descriptor from some sort of structure. As soon as you use nio4r, which uses NIO channels, it blows. It all successfully works with MRI/libev.

@tarcieri
Copy link

tarcieri commented Jun 1, 2016

I'm curious how NIO channels like this function with IO.select (or io/wait) if they can't be registered with reading as an interestOp

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