---
title: llarp::path::PathContext::SyncOwnedPathsMap_t

---

# llarp::path::PathContext::SyncOwnedPathsMap_t





## Public Types

|                | Name           |
| -------------- | -------------- |
| using std::mutex | **[Mutex_t](Classes/structllarp_1_1path_1_1PathContext_1_1SyncOwnedPathsMap__t.md#using-mutex-t)**  |
| using std::lock_guard< Mutex_t > | **[Lock_t](Classes/structllarp_1_1path_1_1PathContext_1_1SyncOwnedPathsMap__t.md#using-lock-t)**  |

## Public Functions

|                | Name           |
| -------------- | -------------- |
| OwnedPathsMap_t second | **[GUARDED_BY](Classes/structllarp_1_1path_1_1PathContext_1_1SyncOwnedPathsMap__t.md#function-guarded-by)**(first ) |
| template <typename OwnedHopVisitor \> <br>void | **[ForEach](Classes/structllarp_1_1path_1_1PathContext_1_1SyncOwnedPathsMap__t.md#function-foreach)**(OwnedHopVisitor && visit)<br>Invokes a callback for each owned path; visit must be invokable with a `const Path_ptr&` argument.  |
| Lock_t | **[acquire](Classes/structllarp_1_1path_1_1PathContext_1_1SyncOwnedPathsMap__t.md#function-acquire)**() |

## Public Attributes

|                | Name           |
| -------------- | -------------- |
| Mutex_t | **[first](Classes/structllarp_1_1path_1_1PathContext_1_1SyncOwnedPathsMap__t.md#variable-first)**  |

## Public Types Documentation

### using Mutex_t

```cpp
using llarp::path::PathContext::SyncOwnedPathsMap_t::Mutex_t =  std::mutex;
```


### using Lock_t

```cpp
using llarp::path::PathContext::SyncOwnedPathsMap_t::Lock_t =  std::lock_guard<Mutex_t>;
```


## Public Functions Documentation

### function GUARDED_BY

```cpp
OwnedPathsMap_t second GUARDED_BY(
    first 
)
```


### function ForEach

```cpp
template <typename OwnedHopVisitor >
inline void ForEach(
    OwnedHopVisitor && visit
)
```

Invokes a callback for each owned path; visit must be invokable with a `const Path_ptr&` argument. 

### function acquire

```cpp
inline Lock_t acquire()
```


## Public Attributes Documentation

### variable first

```cpp
Mutex_t first;
```


-------------------------------

Updated on 2023-04-27 at 04:17:17 +0000