func RecoverTrace() {
	if r := recover(); r != nil {
		log.Printf("Panic ignored: %s", r)
		for i := 0; i < 10; i++ {
			_, file, line, ok := runtime.Caller(i)
			if !ok {
				break  
			}
			log.Printf("\t%s:%d", file, line)
		}
	}
}
RecoverTrace will trigger a stack trace when a panic was recovered by this
function. Typically used as "defer RecoverTrace()".
package tgo
import (
	"log"
	"os"
	"runtime"
	"time"
)
var ShutdownCallback = func() {
	proc, _ := os.FindProcess(os.Getpid())
	proc.Signal(os.Interrupt)
}
func ReturnAfter(runtimeLimit time.Duration, callback func()) bool {
	timeout := time.NewTimer(runtimeLimit)
	callOk := make(chan bool)
	go func() {
		callback()
		timeout.Stop()
		callOk <- true
	}()
	select {
	case <-timeout.C:
		return false
	case <-callOk:
		return true
	}
}
func RecoverShutdown() {
	if r := recover(); r != nil {
		log.Printf("Panic shutdown: %s", r)
		for i := 0; i < 10; i++ {
			_, file, line, ok := runtime.Caller(i)
			if !ok {
				break  
			}
			log.Printf("\t%s:%d", file, line)
		}
		ShutdownCallback()
	}
}