mirror of
https://github.com/teivah/100-go-mistakes.git
synced 2026-06-24 18:36:54 +08:00
Unbuffered channel
This commit is contained in:
parent
bfd5c81e86
commit
1708b80ca9
1 changed files with 1 additions and 1 deletions
|
|
@ -1527,7 +1527,7 @@ In summary, let’s be mindful that a goroutine is a resource like any other tha
|
||||||
|
|
||||||
One common mistake made by Go developers while working with channels is to make wrong assumptions about how select behaves with multiple channels.
|
One common mistake made by Go developers while working with channels is to make wrong assumptions about how select behaves with multiple channels.
|
||||||
|
|
||||||
For example, let's consider the following case (`disconnectCh` is a buffered channel):
|
For example, let's consider the following case (`disconnectCh` is a unbuffered channel):
|
||||||
|
|
||||||
```go
|
```go
|
||||||
go func() {
|
go func() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue