Grokking Concurrency in Go
0% completed
Nonblocking Channel Operations with Default
There are two ways to collect mail from a mailbox in an apartment building. You can stand next to the box until a letter arrives. Or you can look inside as you walk past, and go on to other tasks if it is empty. The first way guarantees that you get the next letter, but it stops you from doing anything else. The second way never stops you, but you sometimes leave with nothing.
Every channel operation seen so far works the first way. A receive waits for a value, a send waits for a receiver or a free slot, and a [`select
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%