Git Product home page Git Product logo

Comments (6)

RainbowMango avatar RainbowMango commented on July 20, 2024

抱歉拖这么久才回复你,是的这段描述是不妥。

from goexpertprogramming.

RainbowMango avatar RainbowMango commented on July 20, 2024

结合你的建议,拟修改如下:

-该方法返回一个channel,需要在select-case语句中使用,如"case <-context.Done():"。
+该方法返回一个用于探测Context是否取消的channel,当Context取消时会自动将该channel关闭。

-当context关闭后,Done()返回一个被关闭的管道,关闭的管道仍然是可读的,据此goroutine可以收到关闭请求;
-当context还未关闭时,Done()返回nil。
+需要注意的是,对于不支持取消的Context,该方法可能会返回nil。例如, context.Backgroud()。

Any comments?

from goexpertprogramming.

RainbowMango avatar RainbowMango commented on July 20, 2024

另外,我始终觉得Go语言只是个工具,对语言深层次的设计原理,我觉得只适用于少数发烧友。暂时没计划再深入研究。

from goexpertprogramming.

povsister avatar povsister commented on July 20, 2024

Any comments?

没什么问题,感觉更精炼了些。

from goexpertprogramming.

povsister avatar povsister commented on July 20, 2024

另外,我始终觉得Go语言只是个工具,对语言深层次的设计原理,我觉得只适用于少数发烧友。暂时没计划再深入研究。

可能因为个人习惯的缘故,使用工具之前更喜欢理解工具的基本概念和设计原理,工具用起来才能更顺手。
书很棒,对于语言深入理解很有帮助 👍

from goexpertprogramming.

RainbowMango avatar RainbowMango commented on July 20, 2024

可能因为个人习惯的缘故,使用工具之前更喜欢理解工具的基本概念和设计原理,工具用起来才能更顺手

的是,了解了设计原理用起来更不容易出错。

from goexpertprogramming.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.