repo.or.cz
/
binutils-gdb.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Rename gdb/ChangeLog to gdb/ChangeLog-2021
[binutils-gdb.git]
/
gdb
/
testsuite
/
gdb.go
/
chan.go
blob
f2372880686cca49cbab1beb103725240739c72c
1
package
main
2
3
import
"fmt"
4
5
func
generate
()
chan
int
{
6
ch
:=
make
(
chan
int
)
7
go func
() {
8
for
i
:=
0
; ;
i
++ {
9
ch
<-
i
// set breakpoint 1 here
10
}
11
}()
12
return
ch
13
}
14
15
func
main
() {
16
integers
:=
generate
()
17
for
i
:=
0
;
i
<
100
;
i
++ {
// Print the first hundred integers.
18
fmt
.
Println
(<-
integers
)
// set breakpoint 2 here
19
}
20
}