News for hackers. Stuff that matters.
Re:Writing Apps in Go and Swift by Groxx on Tuesday January 29, 2019 @06:38PM (#19031041)
This is correct, golang doesn't give you thread safety for free. Values passed via channels are safe as they're implicitly locked (i.e. it's a blocking threadsafe queue), and there are happens-before semantics for starting a goroutine, otherwise you're on your own (explicit locks / atomics / lock-wrappers like sync.WaitGroup). E.g. variable assignment isn't even atomic.

There are no comments on this comment yet.