示例#1
0
文件: common.go 项目: dzyk/dcoin-go
func CheckDaemonsRestart(chBreaker chan bool, chAnswer chan string, goRoutineName string) bool {
	log.Debug("CheckDaemonsRestart %v %v", goRoutineName, utils.Caller(2))
	select {
	case <-chBreaker:
		log.Debug("DaemonCh true %v", goRoutineName)
		chAnswer <- goRoutineName
		return true
	default:
	}
	return false
}
示例#2
0
文件: common.go 项目: dzyk/dcoin-go
func (d *daemon) dbUnlock() error {
	log.Debug("dbUnlock %v", utils.Caller(1))
	return d.DbUnlock(d.goRoutineName)
}