On Tue, Jan 29, 2019 at 12:55 AM 伊藤和也 <kazya.ito.dr...@gmail.com> wrote:
>
> I know the general meaning of a deadlock, but I don't know the meaning of a 
> deadlock in golang. For example, I send 4 values to a buffered channel whose 
> maxmum size is 3 and a deadlock occurs. I think this is just "values are out 
> of bounds" like array.

Sending a value on a buffered channel, where the buffer is full, is
not like an array "index out of bounds" error.  Channels are not
arrays.  If the buffer is full, the channel send will block until some
other goroutine receives a value from the channel.

Ian

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