Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Side by Side Diff: gdb/testsuite/gdb.go/chan.go

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gdb/testsuite/gdb.go/chan.exp ('k') | gdb/testsuite/gdb.go/handcall.exp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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 }
OLDNEW
« no previous file with comments | « gdb/testsuite/gdb.go/chan.exp ('k') | gdb/testsuite/gdb.go/handcall.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698