|
|
|
|
|
by smokey_circles
1446 days ago
|
|
I've never had an issue with data race conditions in go. Can I ask what you did to lose faith? The answer, for me, is always channels. What you put around the channels is the challenging part. Channels are built to pass information between goroutines. If you are doing this via any other signaling, just don't. You can loop over channels for long running sequential reads, you can test them to see if they're ready to read or ready to write. Honorable mention to context as well, extremely useful structure. |
|
"Data Race Patterns in Go", posted 21 days ago: https://news.ycombinator.com/item?id=31698503
Even though I'm extremely careful, I'm sure I've done one or more of the anti-patterns they outline where the outcome is completely incorrect program behavior compared to my intentions as the architect of the program.
A good language wouldn't encourage or even compile with such nonsense.
---
Isn't it funny how Go offers channels but the stdlib never uses them at all?