Following is a dangerous error-prone technique. If you use it in you program, most likely you have a hidden bug, that will appear in high concurrency situation.
``` func wait(c chan T) T { v := <-c c <- v; return v; } ``` I had proposal for future primitive: https://github.com/golang/go/issues/17466 , but looks like community doesn't agree with my intention. -- 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.