Y
Hacker News
new
|
ask
|
show
|
jobs
by
osigurdson
65 days ago
A goroutins shares memory so you can just share variables if you want. It is basically the same as any other language in this regard.
2 comments
treyd
65 days ago
It's also just as easy to
incorrectly
share memory and cause race conditions. There's no protection against it and it violates memory safety.
link
osigurdson
64 days ago
For sure. The parent comment was merely asking if it could be done without channels or mutex, not if it was a good idea or not. Of course sometimes it is indeed the right thing to do.
link
osigurdson
64 days ago
Haha! Laughing at my own comment: "a goroutins shares memory". The iPhone keyboard wins again.
link