mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
* scoped_lock is now a std name with subtly different semantics compared to lock_guard. Namely it can be used to lock 0 or more mutexes. This is valuable, but can also be accidentally used to lock 0 mutexes when 1 was intended, creating a run-time error. Therefore, if and when we use scoped_lock, extra care needs to be taken in reviewing that code to ensure it doesn't accidentally lock 0 mutexes when 1 was intended. To aid in such careful reviewing, the use of the name scoped_lock should be limited to those cases where the number of mutexes is not exactly one.
Ripple Source Guidelines
Each folder contains a single module following the newest style:
- One class per header
- As much implementation hidden as possible
- All major interfaces are abstract
- Every class is documented
- Each module focuses on solving one problem