提交 105f9bf8 编写于 作者: 写代码的明哥's avatar 写代码的明哥

Update:更正笔误

上级 cafd046d
......@@ -191,7 +191,7 @@ func main() {
验证方法也很简单,使用完一次类型断言后,对返回的对象再一次使用类型断言,Goland 立马就会提示我们新对象 b 不是一个接口类型的对象,不允许进行类型断言。
![image-20200614154343406](/Users/MING/Library/Application Support/typora-user-images/image-20200614154343406.png)
![](http://image.iswbm.com/image-20200614154343406.png)
......
......@@ -210,15 +210,13 @@ int,而 b 的静态类型为 interface{})
验证方法也很简单,使用完一次类型断言后,对返回的对象再一次使用类型断言,Goland
立马就会提示我们新对象 b 不是一个接口类型的对象,不允许进行类型断言。
.. figure:: /Users/MING/Library/Application%20Support/typora-user-images/image-20200614154343406.png
:alt: image-20200614154343406
image-20200614154343406
|image1|
--------------
|image1|
|image2|
.. |image0| image:: http://image.iswbm.com/20200607145423.png
.. |image1| image:: http://image.iswbm.com/20200607174235.png
.. |image1| image:: http://image.iswbm.com/image-20200614154343406.png
.. |image2| image:: http://image.iswbm.com/20200607174235.png
......@@ -119,7 +119,7 @@ count 的值为: 3000
- 同一协程里,不要对已解锁的锁再次解锁
- 加了锁后,别忘了解锁,必要时使用 defer 语句
## 3. 读写锁:RWMutex
## 2. 读写锁:RWMutex
Mutex 是最简单的一种锁类型,他提供了一个傻瓜式的操作,加锁解锁加锁解锁,让你不需要再考虑其他的。
......
......@@ -129,7 +129,7 @@ exclusion)是为了来保护一个资源不会因为并发操作而引起冲
- 同一协程里,不要对已解锁的锁再次解锁
- 加了锁后,别忘了解锁,必要时使用 defer 语句
3. 读写锁:RWMutex
2. 读写锁:RWMutex
------------------
Mutex
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册