> > Both the channel and the value expression are evaluated before > communication begins. Communication blocks until the send can proceed. A > send on an unbuffered channel can proceed if a receiver is ready. A send on > a buffered channel can proceed if there is room in the buffer. A send on a > closed channel proceeds by causing a run-time panic. A send on a nil > channel blocks forever.
https://golang.org/ref/spec#Send_statements So, yes. On Wed, Jan 24, 2018 at 8:43 PM, dc0d <kaveh.shahbaz...@gmail.com> wrote: > If the channel is nil, there's nothing to lock. But also, there's no >> sending happening. >> > > So first the payload is computed and then the nil check happens? > > -- > 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. > -- 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.