Skip to content

Commit 2573ebd

Browse files
authored
Merge pull request #1165 from Apriil15/master
Update 02.7.md
2 parents 92361a4 + c3c6698 commit 2573ebd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

zh-tw/02.7.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ func main() {
165165
>另外記住一點的就是 channel 不像檔案之類別的,不需要經常去關閉,只有當你確實沒有任何傳送資料了,或者你想明確的結束 range 迴圈之類別的時候。
166166
167167
## Select
168-
我們上面介紹的都是隻有一個 channel 的情況,那麼如果存在多個 channel 的時候,我們該如何操作呢,Go 裡面提供了一個關鍵字 `select`,透過 `select` 可以監聽 channel 上的資料流動。
168+
我們上面介紹的都是只有一個 channel 的情況,那麼如果存在多個 channel 的時候,我們該如何操作呢,Go 裡面提供了一個關鍵字 `select`,透過 `select` 可以監聽 channel 上的資料流動。
169169

170170
`select` 預設是阻塞的,只有當監聽的 channel 中有傳送或接收可以進行時才會執行,當多個 channel 都準備好的時候,select 會隨機選擇其中一個執行。
171171

0 commit comments

Comments
 (0)