aboutsummaryrefslogtreecommitdiff
path: root/src/netbase.h
diff options
context:
space:
mode:
authorVasil Dimov <vd@FreeBSD.org>2021-04-26 16:22:07 +0200
committerVasil Dimov <vd@FreeBSD.org>2021-11-18 13:29:23 +0100
commit75e8bf55f5a014faada7712a9640dc35e8c86f15 (patch)
treee008c898e12afe42bf673a15a48de49028c0803d /src/netbase.h
parentb9cf505bdfade074f3d2b0473d56d2cbc2711cb3 (diff)
net: dedup and RAII-fy the creation of a copy of CConnman::vNodes
The following pattern was duplicated in CConnman: ```cpp lock create a copy of vNodes, add a reference to each one unlock ... use the copy ... lock release each node from the copy unlock ``` Put that code in a RAII helper that reduces it to: ```cpp create snapshot "snap" ... use the copy ... // release happens when "snap" goes out of scope ```
Diffstat (limited to 'src/netbase.h')
0 files changed, 0 insertions, 0 deletions