Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

译|Go Concurrency Patterns: Context #112

Open
cyningsun opened this issue Jan 19, 2021 · 0 comments
Open

译|Go Concurrency Patterns: Context #112

cyningsun opened this issue Jan 19, 2021 · 0 comments

Comments

@cyningsun
Copy link
Owner

https://www.cyningsun.com/01-19-2021/go-concurrency-patterns-context-cn.html

在 Go 服务中,每个传入的请求在单独的 goroutine 中处理。请求回调函数通常启动额外的 goroutine 以访问后端,如数据库和RPC服务。处理同一请求的一系列 goroutine 通常需要访问请求相关的值,例如端用户的标识、授权令牌和请求截止时间。当请求被取消或超时,处理该请求的所有 goroutine 都应该快速退出,以便系统可以回收它们正在

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant