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.
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.
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.
Ian
--
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.