Sorry, I didn't include some internal narrative which caused me to mention races.

To me I assumed your question about two goroutines reading from the same connection. At least in the case of TCP this doesn't really make sense: since TCP is stream oriented how are you supposed to divvy up a stream of bytes to more than one reader? It just seems inherently racey to me.

I don't know much about RPC and forgot for a bit that net.Conn is an interface rather than an implementation so it could make sense in the context of that protocol.

Still though, I suggest just doing a small example and trying it. I don't think it'd be a long program. If it always works then I'd imagine you did it correctly. If it never works or spuriously fails then clearly you'll have to try another solution.

You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 4 of 5 | next ›
Discussion Overview
groupgolang-nuts @
postedOct 25, '14 at 9:33a
activeOct 25, '14 at 8:01p



site design / logo © 2022 Grokbase