-
-
Notifications
You must be signed in to change notification settings - Fork 103
Fix ReentrantMutex
locking inside Fiber
spec for ruby-3.2
#553
Conversation
Sending to review, specs are green locally with ruby-3.2-preview3 |
Also, |
66ab781
to
269599f
Compare
The old spec didn't fail with I intend to:
|
It raises `ThreadError` since ruby/ruby#6680
5345377
to
5de969f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Realistically this should be a pending spec on Ruby 3.2 as its something we should look to fix... (Its not expected to error, it just does)... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, this just adapts the test to the new exception/behavior in CRuby
I've been working on reworking the spec to run, I don't think its a change in behaviour it's just the way of testing it that broke? |
It's a behavior change in Ruby, the deadlock is detected and so it doesn't hang. An alternative would be to use a Fiber scheduler, then it would behave as before, since with a scheduler it makes sense to wait. A Fiber scheduler is probably the reason we needed to fix RSpec ReentrantMutex. Would need to make a dummy Fiber scheduler for tests, it's probably fairly short if only used for this example. |
#501 is the original issue |
I'm closing this for now, we currently skip this on Rubies were its broken, I'd like to fix this spec rather than a no op expect an error (probably needing a fiber scheduler) especially as on my machine its definielty a broken spec (the raise leaks rather than a deadlock) |
It raises
ThreadError
since ruby/ruby#6680