mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-05 14:06:27 -05:00
Prefer Python for scripts in developer notes
along with a few miscellaneous touch-ups.
This commit is contained in:
parent
370120ec2f
commit
fc4cb857cc
1 changed files with 5 additions and 3 deletions
|
@ -859,12 +859,12 @@ from using a different variable with the same name),
|
|||
please name variables so that their names do not shadow variables defined in the source code.
|
||||
|
||||
When using nested cycles, do not name the inner cycle variable the same as in
|
||||
the upper cycle, etc.
|
||||
the outer cycle, etc.
|
||||
|
||||
Threads and synchronization
|
||||
----------------------------
|
||||
|
||||
- Prefer `Mutex` type to `RecursiveMutex` one
|
||||
- Prefer `Mutex` type to `RecursiveMutex` one.
|
||||
|
||||
- Consistently use [Clang Thread Safety Analysis](https://clang.llvm.org/docs/ThreadSafetyAnalysis.html) annotations to
|
||||
get compile-time warnings about potential race conditions in code. Combine annotations in function declarations with
|
||||
|
@ -943,6 +943,8 @@ TRY_LOCK(cs_vNodes, lockNodes);
|
|||
Scripts
|
||||
--------------------------
|
||||
|
||||
Write scripts in Python rather than bash, when possible.
|
||||
|
||||
### Shebang
|
||||
|
||||
- Use `#!/usr/bin/env bash` instead of obsolete `#!/bin/bash`.
|
||||
|
@ -1386,7 +1388,7 @@ communication:
|
|||
```
|
||||
|
||||
- For consistency and friendliness to code generation tools, interface method
|
||||
input and inout parameters should be ordered first and output parameters
|
||||
input and in-out parameters should be ordered first and output parameters
|
||||
should come last.
|
||||
|
||||
Example:
|
||||
|
|
Loading…
Add table
Reference in a new issue