On Wednesday, March 8, 2017 at 9:50:09 AM UTC-5, Chris Hines wrote:
>
> The infinite loops in each function will busy loop and consume a core 
> without allowing the runtime scheduler a chance to run other goroutines on 
> that core. If your virtual machine doesn't have enough cores then some 
> goroutines may starve.
>
> Change the loops to select {} to block infinitely without busy looping and 
> see if that behaves as expected.
>

I like to use "<-make(chan interface{}) " as a one line "block forever" 
statement.

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to