diff --git a/examples/non-blocking-channel-operations/non-blocking-channel-operations.go b/examples/non-blocking-channel-operations/non-blocking-channel-operations.go index 24cd6ff..dfd0516 100644 --- a/examples/non-blocking-channel-operations/non-blocking-channel-operations.go +++ b/examples/non-blocking-channel-operations/non-blocking-channel-operations.go @@ -22,7 +22,10 @@ func main() { fmt.Println("no message received") } - // A non-blocking send works similarly. + // A non-blocking send works similarly. Here `msg` + // cannot be sent to the `messages` channel, because + // the channel has no buffer and there is no receiver. + // Therefore the `default` case is selected. msg := "hi" select { case messages <- msg: diff --git a/examples/non-blocking-channel-operations/non-blocking-channel-operations.hash b/examples/non-blocking-channel-operations/non-blocking-channel-operations.hash index 3bca2a4..a9f03de 100644 --- a/examples/non-blocking-channel-operations/non-blocking-channel-operations.hash +++ b/examples/non-blocking-channel-operations/non-blocking-channel-operations.hash @@ -1,2 +1,2 @@ -119ced4df4f79795b163483b6abfd855e76ef577 -M972dltae2 +a6e0a8bb87153c7ed0de4996172f7ad5d89c6814 +n5ttmOsMrrJ diff --git a/public/non-blocking-channel-operations b/public/non-blocking-channel-operations index ba7aed6..2e2e713 100644 --- a/public/non-blocking-channel-operations +++ b/public/non-blocking-channel-operations @@ -42,7 +42,7 @@ non-blocking multi-way selects.

- +
package main
 
@@ -98,7 +98,10 @@ it will immediately take the default case.

-

A non-blocking send works similarly.

+

A non-blocking send works similarly. Here msg +cannot be sent to the messages channel, because +the channel has no buffer and there is no receiver. +Therefore the default case is selected.