gopl-zh.github.com/ch9/ch9.md

6 lines
533 B
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# 第9章 基于共享变量的并发
前一章我们介绍了一些使用goroutine和channel这样直接而自然的方式来实现并发的方法。然而这样做我们实际上回避了在写并发代码时必须处理的一些重要而且细微的问题。
在本章中我们会细致地了解并发机制。尤其是在多goroutine之间的共享变量并发问题的分析手段以及解决这些问题的基本模式。最后我们会解释goroutine和操作系统线程之间的技术上的一些区别。