Thank you Sir
now i understand the difference
2018. május 4., péntek 15:21:49 UTC+2 időpontban k1at...@gmail.com a
következőt írta:
>
> Hi
>
> i dont' understn what is the difference between :
>
> ch := make(chan bool,1) vs. ch := make(chan bool)
>
> this sample works well :
>
> packag
ch := make(chan bool) means you want to have an unbufferred channel. Send
and Receive are block operations. In other words, send will block unless
there is a receive operation, which is the case in your code. All calls to
increment are blocked at ch <- true.
When you change it to ch := make(cha