Skip to content

Commit 73f747d

Browse files
author
wziww
committed
select nil chan
1 parent 4973617 commit 73f747d

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

select.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,15 @@ loop:
563563

564564
switch cas.kind {
565565
case caseNil:
566-
// 这个 case 要怎么触发?
566+
/*
567+
* var nil_chan chan int
568+
* var non_nil_chan chan int = make(chan int)
569+
* select {
570+
* case <-nil_chan:
571+
* // here
572+
* case <-non_nil_chan:
573+
* }
574+
*/
567575
continue
568576

569577
case caseRecv:

0 commit comments

Comments
 (0)