-
-
Notifications
You must be signed in to change notification settings - Fork 103
Use Mutex#owned? to correctly check if the Mutex is owned by the current Thread or Fiber #503
Conversation
Great insight and improved implementation. Well done. |
It's strange, on 3.0.0 it fails locally for me (macOS 10.14.6):
Wondering if
Installing 3.0.1 and reinstalling 3.0.0 to understand if there is a difference, as CI seems to be using 3.0.1:
|
No worries on 1.8 and 1.9 failures, we can conditionally define different method implementations for |
Same failure for me on 3.0.1. @eregon do you think it is possible to change the test not to rely on platform-specific behaviour? |
The message above looks a bit like a bug of the |
4d324c6
to
5e76f82
Compare
The test should work reliably now. |
Unfortunately I can't even see the CI running due that change done by GitHub :/ (https://twitter.com/eregontp/status/1387472155567394820) |
5e76f82
to
708d217
Compare
Retargeted to |
Works seamlessly.
An inconvenience at least.
I understand. No problem, I'll take care of backporting. Thanks a lot for putting your time in this, @eregon ! |
…ent Thread or Fiber * In Ruby >= 3, Mutex are held per Fiber, not per Thread. * Fixes rspec#501
4e3f88e
to
a4be9d5
Compare
@JonRowe @benoittgt I intend to merge on green, since it's for RSpec 4.0, and will send a backport PR for RSpec 3. |
Amazing work everyone! |
…reentrant-mutex-fiber Use Mutex#owned? to correctly check if the Mutex is owned by the current Thread or Fiber --- This commit was imported from rspec/rspec-support@6538c68.
Based on #502 (comment)
Seems a better alternative to #502.