Skip to content

Commit 5fd81fd

Browse files
authored
Update shared-mutex.md
Fix blocks of code that aren't wrapped in backticks.
1 parent 9b7e6a9 commit 5fd81fd

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

docs/standard-library/shared-mutex.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ void swap(shared_lock<Mutex>& x, shared_lock<Mutex>& y) noexcept;
130130
### <a name="class_shared_mutex"></a> shared_mutex Class
131131
Class `shared_mutex` implements a non-recursive mutex with shared ownership semantics.
132132
133+
```cpp
133134
class shared_mutex {
134135
public:
135136
shared_mutex();
@@ -150,10 +151,12 @@ class shared_mutex {
150151
typedef void** native_handle_type; // implementation defined
151152
native_handle_type native_handle();
152153
};
153-
154+
```
155+
154156
### <a name="class_shared_timed_mutex"></a> shared_timed_mutex Class
155157
Class `shared_timed_mutex` implements a non-recursive mutex with shared ownership semantics that meets the requirements of a timed mutex type.
156158

159+
```cpp
157160
class shared_timed_mutex {
158161
public:
159162
shared_timed_mutex();
@@ -179,10 +182,12 @@ class shared_timed_mutex {
179182
bool try_lock_shared_until(const chrono::time_point\<Clock, Duration>& abs_time);
180183
void unlock_shared();
181184
};
182-
185+
```
186+
183187
### <a name="class_shared_lock"></a> shared_lock Class
184188
Template class `shared_lock` controls the shared ownership of a shared mutex object within a scope. The template parameter must be a shared mutex type.
185-
189+
190+
```cpp
186191
class shared_lock {
187192
public:
188193
typedef Mutex mutex_type;
@@ -222,7 +227,8 @@ class shared_lock {
222227
mutex_type* pm; // exposition only
223228
bool owns; // exposition only
224229
};
225-
230+
```
231+
226232
## Functions
227233

228234
### <a name="function_swap"></a> swap Function

0 commit comments

Comments
 (0)