On Wed, Jan 7, 2015 at 8:28 AM, wrote:
Are there any official specifications on "pseudorandomly picked" a goroutine
to proceed when encountering many waiting goroutines reading/writing on a
blocked channel? And if so, why are they implemented that way rather than
pure FIFO? I know that select statement behave pseudorandomly, but to think
that blocked channels behave that way too is making me feel like it's a
waste of processing resource.
The only pseudo-random choice is for select. Channel reads and writes
other than select are handled with a FIFO queue. Of course the exact
ordering on the queue is unpredictable when multiple goroutines are
running simultaneously.


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


Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 10 of 10 | next ›
Discussion Overview
groupgolang-nuts @
postedDec 25, '14 at 9:15p
activeJan 7, '15 at 4:51p



site design / logo © 2022 Grokbase