Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
Jabbles
on March 12, 2014
|
parent
|
context
|
favorite
| on:
Sane Concurrency with Go
e.g.
sync.Once() instead of init()
unhelpful named return parameters
didn't use range over channels
namelezz
on March 12, 2014
[–]
sync.Once() instead of init(). Having the Do closed to where the channels being used makes sure we do not run into deadlock. It's a nice pattern for lazy initializing of channels and goroutine too.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
sync.Once() instead of init()
unhelpful named return parameters
didn't use range over channels