News for hackers. Stuff that matters.
Re:Data Race Patterns in Go by Thaxll on Saturday June 11, 2022 @09:50AM (#31704403)
Why would you share a decoder? It makes no sense since you need to decode just once.
Re:Data Race Patterns in Go by masklinn on Monday June 13, 2022 @03:57AM (#31722524)
You can decode multiple values from a stream.

In a language which focuses on concurrency correctness, the decoder would either be thread-safe (in which case you could use it as an input queue) or not be usable from multiple threads (in which case you’d clearly have to create the queue yourself).