Comments (6)
抱歉拖这么久才回复你,是的这段描述是不妥。
from goexpertprogramming.
结合你的建议,拟修改如下:
-该方法返回一个channel,需要在select-case语句中使用,如"case <-context.Done():"。
+该方法返回一个用于探测Context是否取消的channel,当Context取消时会自动将该channel关闭。
-当context关闭后,Done()返回一个被关闭的管道,关闭的管道仍然是可读的,据此goroutine可以收到关闭请求;
-当context还未关闭时,Done()返回nil。
+需要注意的是,对于不支持取消的Context,该方法可能会返回nil。例如, context.Backgroud()。
Any comments?
from goexpertprogramming.
另外,我始终觉得Go语言只是个工具,对语言深层次的设计原理,我觉得只适用于少数发烧友。暂时没计划再深入研究。
from goexpertprogramming.
Any comments?
没什么问题,感觉更精炼了些。
from goexpertprogramming.
另外,我始终觉得Go语言只是个工具,对语言深层次的设计原理,我觉得只适用于少数发烧友。暂时没计划再深入研究。
可能因为个人习惯的缘故,使用工具之前更喜欢理解工具的基本概念和设计原理,工具用起来才能更顺手。
书很棒,对于语言深入理解很有帮助 👍
from goexpertprogramming.
可能因为个人习惯的缘故,使用工具之前更喜欢理解工具的基本概念和设计原理,工具用起来才能更顺手
的是,了解了设计原理用起来更不容易出错。
from goexpertprogramming.
Related Issues (20)
- [建议] 5.3 context可以把例子前移么 HOT 2
- [勘误]反馈一个第2章第2.2节的示例运行结果错误 HOT 3
- [勘误]反馈一个第1章第3节的内容错误 HOT 9
- [勘误]反馈一个第1章第3.3节的流程图 HOT 2
- [勘误]反馈一个第1章第1.2节的运行结果错误 HOT 3
- [勘误]反馈一个第2章第2.3节的错别字 HOT 1
- [勘误]反馈一个第一章第2节的错别字 HOT 1
- [勘误]反馈一个第M章第N节的错别字 HOT 2
- [勘误]反馈一个第3章第1节的错别字 HOT 7
- 关于3.2G0系统调用描述问题探讨 HOT 1
- [勘误]反馈一个第一章第二节中关于slice扩容问题 HOT 7
- [勘误]反馈一个第4章 4.1内存分配的配图问题 HOT 1
- [勘误]反馈一个第1章第3节的问题 HOT 3
- 关于13.1节的疑问
- 关于13.1节的疑问 HOT 5
- [勘误]反馈一个第1章第2节,关于切片简单表达式的 cap 取值问题 HOT 2
- [勘误]反馈一个第1章第3节的错别字 HOT 2
- [勘误]反馈一个第2章第2节的错别字 HOT 1
- [勘误]反馈一个第一章第一节的错误 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from goexpertprogramming.