Skip to content

Commit

Permalink
Unbuffered Channels
Browse files Browse the repository at this point in the history
  • Loading branch information
aditya43 committed May 30, 2021
1 parent ac3b720 commit f687b34
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,14 @@ value, ok = <- ch
## Range Over Channel:
- The receiver Goroutine can receive sequence of values from Channel and then it can range over those values.
- Loop automatically breaks when Channel is closed.
- Range does not return the second boolean value.
- Range does not return the second boolean value.

-----------

## Unbuffered Channels:
- They are synchronous.
- Receiving channel will block until there is sender and sender will block until there is receiver.
- To create Unbuffered Channel:
```go
ch := make(chan int)
```

0 comments on commit f687b34

Please sign in to comment.