Skip to content

[#5287] Use epoll selector for file IO on macosx#5373

Merged
headius merged 1 commit intojruby:masterfrom
alexis779:issue_5287
Oct 26, 2018
Merged

[#5287] Use epoll selector for file IO on macosx#5373
headius merged 1 commit intojruby:masterfrom
alexis779:issue_5287

Conversation

@alexis779
Copy link
Contributor

This PR addresses #5287.

Without it, unit test gets stuck on the select call. See Thread dump.

It needs jnr/jnr-enxio#29 feature to avoid KQSelector and fallback on EpollSelector. We pass isFile=true in NativeDeviceChannel constructor in the case of a file. This avoids getting stuck on macosx when calling kevent system call at the end of the file.

kqueue does not support EOF. There is no easy way to skip select call to avoid blocking for ever.

We still want to use KQSelector for sockets. Just not vnodes.

@kares
Copy link
Member

kares commented Oct 17, 2018

there seems to be an (unrelated) compilation failure with CI ... maybe you should rebase of recent master

@kares kares added this to the JRuby 9.2.1.0 milestone Oct 17, 2018
@alexis779
Copy link
Contributor Author

[ERROR] /home/travis/build/jruby/jruby/core/src/main/java/org/jruby/util/RegularFileResource.java:[208,19] error: no suitable constructor found for NativeDeviceChannel(int,boolean)

NativeDeviceChannel is part of a different lib. We need to merge in jnr/jnr-enxio#29 in a new jnr-enxio release, version 0.19 ?

@headius
Copy link
Member

headius commented Oct 26, 2018

I'm on it.

@headius headius merged commit 9eb6d67 into jruby:master Oct 26, 2018
@headius
Copy link
Member

headius commented Oct 26, 2018

This may fail initially if the jnr-enxio 0.19 release has not propagated, but it's merged!

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

Successfully merging this pull request may close these issues.

3 participants