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

Test passing control between two threads in the ConditionVariable spec #5866

Merged
merged 1 commit into from Oct 27, 2019

Conversation

asppsa
Copy link
Contributor

@asppsa asppsa commented Sep 10, 2019

This tests (J)Ruby's ability to safely switch back and forth between two threads that both have locks on a single mutex, as identified in #5863.

I'm happy to make changes to this spec if needed. In particular, I wasn't sure what a suitable timeout should be (went with 5 seconds), and also whether to add this to the spec for #signal or #wait. I went with #signal because it seems that the failure is in the ability to wake up after going to sleep.

@asppsa
Copy link
Contributor Author

asppsa commented Sep 10, 2019

Also, I should note that I used MRI 2.6 to check that this spec can pass.

@kares kares added the tests label Sep 10, 2019
@kares kares added this to the JRuby 9.2.9.0 milestone Sep 10, 2019
@asppsa
Copy link
Contributor Author

asppsa commented Oct 26, 2019

@headius, I'll rebase this onto master to see if it passes now.

This tests (J)Ruby's ability to safely switch back and forth between two
threads that both have locks on a single mutex, as identified in jruby#5863.
@headius
Copy link
Member

headius commented Oct 27, 2019

Excellent, thank you! Assuming this goes green I'll merge it in.

@headius
Copy link
Member

headius commented Oct 27, 2019

Two suites failed despite my best efforts, but I'm convinced they're just caching problems with the jnr-constants maven artifact. Merging this in...thank you for your thoroughness @asppsa!

@headius headius merged commit 1669333 into jruby:master Oct 27, 2019
@eregon
Copy link
Member

eregon commented Nov 30, 2019

@asppsa Thanks for this good spec, it also caught a bug in TruffleRuby!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants