Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d252c6b

Browse files
committed
修改笔误 fix Mq-b#8
1 parent 9c62cde commit d252c6b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎md/03共享数据.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ void swap(X& lhs, X& rhs) {
484484
}
485485
```
486486
487-
解释这段代码最简单的方式就是直接展示标准库的源码,首先,我们要了解 `std::defer_lock` 是"假设调用方线程已拥有互斥体的所有权"。没有所有权自然构造函数就不会上锁,但不止如此。我们还要先知道 std::unique_lock 保有的数据成员(都以 [MSVC STL](https://github.com/microsoft/STL/blob/main/stl/inc/mutex#L136-L273) 为例):
487+
解释这段代码最简单的方式就是直接展示标准库的源码,首先,我们要了解 `std::defer_lock` 是"不获得互斥体的所有权"。没有所有权自然构造函数就不会上锁,但不止如此。我们还要先知道 std::unique_lock 保有的数据成员(都以 [MSVC STL](https://github.com/microsoft/STL/blob/main/stl/inc/mutex#L136-L273) 为例):
488488
489489
```cpp
490490
private:

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /