You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Channels are the pipes that connect concurrent goroutines. You can send values into channels from one goroutine and receive those values into another goroutine.
6
+
7
+
- uage:
8
+
create a new channel : make(chan val-type)
9
+
send: channel <-
10
+
receive: <- channel
11
+
12
+
- block:
13
+
By default sends and receives block until both the sender and receiver are ready. This property allowed us to wait at the end of our program for the "ping" message without having to use any other synchronization.
0 commit comments