delve/_fixtures/livetestprog.go
Derek Parker 4c95bf7302 (Mostly) working multithreaded tracing implementation
Areas that need improving:

* Code cleanup
* Promote breakpoints back out of thread context
* Fix potential bug in "Next" implementation, when thread contexts
  switch
2014-10-25 08:59:22 -05:00

29 lines
283 B
Go

package main
import (
"fmt"
"os"
"runtime"
"time"
)
func printPid(pid int) {
fmt.Println(pid)
}
func sayhi() {
fmt.Println("hi")
}
func main() {
runtime.LockOSThread()
pid := os.Getpid()
printPid(pid)
time.Sleep(10 * time.Second)
for {
printPid(pid)
sayhi()
}
}