This commit is contained in:
Kevin Wan
2021-12-13 11:58:58 +08:00
committed by GitHub
parent 07191dc430
commit 914692cc82
5 changed files with 50 additions and 11 deletions

View File

@@ -246,7 +246,7 @@ func (s Stream) Head(n int64) Stream {
}
if n == 0 {
// let successive method go ASAP even we have more items to skip
// why we don't just break the loop, because if break,
// why we don't just break the loop, because if breaks,
// this former goroutine will block forever, which will cause goroutine leak.
close(source)
}