-
Notifications
You must be signed in to change notification settings - Fork 419
Description
Ruby mutex implementation is per-fiber and generally speaking, all locking mechanisms should be per-fiber for the purpose of mutual exclusion.
As such, it appears at least some parts of concurrent ruby might not be correct, according to this specification.
I've been looking at
concurrent-ruby/lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb
Line 51 in 3851561
| class ReentrantReadWriteLock < Synchronization::Object |
Specifically
"kind":"Concurrent::IllegalOperationError",
"message":"Cannot release a read lock which is not held",
It appears that multi-fiber re-entrancy is not supported or handled correctly, or used incorrectly.
I'm not sure what the correct solution is here, but at least we can start having a discussion about how it should work and what the solution is.