4 ms·
It looks like part of it is a similar design to something I came up with myself. Do you know if Synchronized<> protects against accidental recursive locking?
by secondcoming 5y ago
It looks like part of it is a similar design to something I came up with myself.
Do you know if Synchronized<> protects against accidental recursive locking?
- ot 5y agoThere is no explicit protection for recursive locking. In practice, write locks will deadlock, and read lock under read lock will be fine. However, the API encourages practices that make it very hard to recursively acquire the lock (Synchronized is about access to objects, not critical sections).