delve/_fixtures/issue387.go
Alessandro Arzilli c4e01da5ca terminal,service: auto-continue during next and step (#448)
* proc: bugfix: StepInto can not function when temp bps exist

* terminal,service: auto-continue during next and step

Make dlv call continue automatically when a breakpoint is hit on a
different goroutine during a next or step operation.
Added API hooks to implement the other solution to this problem (cancel
the next/step operation if a different breakpoint is hit).

Fixes #387
2016-04-24 16:20:02 -07:00

22 lines
273 B
Go

package main
import (
"fmt"
"sync"
)
func dostuff(id int, wg *sync.WaitGroup) {
fmt.Println("goroutine:", id)
fmt.Println("goroutine:", id)
wg.Done()
}
func main() {
var wg sync.WaitGroup
wg.Add(10)
for i := 0; i < 10; i++ {
go dostuff(i, &wg)
}
wg.Wait()
}