8000 Tags · omenar/guide · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Tags: omenar/guide

Tags

2022-10-18

Toggle 2022-10-18's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Add guidance on goroutine lifecycle management (uber-go#158)

In general, we prefer for goroutines to have well-managed lifecycles.
No uncontrolled background work that cannot be stopped.
This change tries to distill some of the guidance around it into a style
guide entry.
In particular,

- goroutines must end or be stoppable
- APIs must block for goroutines to finish
- `init()` should never spawn a goroutine
0