fix notify back

This commit is contained in:
chzyer 2016-10-06 12:31:47 +08:00
parent fa8d922787
commit 17b536725b
1 changed files with 5 additions and 1 deletions

6
std.go
View File

@ -93,7 +93,11 @@ loop:
select { select {
case <-c.notify: case <-c.notify:
c.read, c.err = c.r.Read(c.data) c.read, c.err = c.r.Read(c.data)
c.notify <- struct{}{} select {
case c.notify <- struct{}{}:
case <-c.stop:
break loop
}
case <-c.stop: case <-c.stop:
break loop break loop
} }