On Thu, 6 Apr 2017 02:04:29 -0700 (PDT) Kemal Hadimli <dis...@gmail.com> wrote:
> Isn't the select processing order random? IIRC the only guarantee is > "default" case is handled as a low priority. > > So, something like this maybe? > > select { > case errCh <- err: > default: > select { > case <-ctx.Done(): > } > } > > Again, take this with a grain of salt. I didn't check the spec or > code, just off the top of my head. The default branch proceeds only if none of the case branches is ready for communication so your reasoning appears to be correct. -- 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.