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

Demonstration of signal handling race #133

Closed
wants to merge 1 commit into from

Conversation

metcalf
Copy link

@metcalf metcalf commented Mar 24, 2017

This is a demonstration test for a signal handling race. I'll follow up with more details in an issue once I get a Travis build failure to link.

@tarcieri
Copy link
Contributor

tarcieri commented Mar 24, 2017

This doesn't look like a "race" so much as a spurious wakeup. Anything that can interrupt a system call will cause the selector to wake up. nio4r intentionally does not gloss over these wakeups, but assumes you're using the selector in a loop which can handle them and retry selecting in the event they are spuriously awoken.

Perhaps this behavior can be better documented, but at least if I'm understanding your example case this is a WONTFIX/"works as intended" for me.

The real answer to providing better behavior is to abstract nio4r in a higher level framework which implements a reactor/proactor loop.

@metcalf
Copy link
Author

metcalf commented Mar 24, 2017

@tarcieri: I added more details in #134. Prefer to continue the discussion over there?

@tarcieri tarcieri closed this Mar 24, 2017
@tarcieri
Copy link
Contributor

Cool, let's continue discussion on #134

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.

None yet

3 participants