On 18 October 2017 at 06:05, Sokolov Yura <funny.fal...@gmail.com> wrote:
> 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;
>     }
> ```

Assuming c has a capacity of 1, what's dangerous about the above?

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