未验证 提交 8aae01de 编写于 作者: Mr.奇淼('s avatar Mr.奇淼( 提交者: GitHub

Merge pull request #304 from songzhibin97/gva_gormv2_dev

修改了热更正在运行时重启信号的丢弃
......@@ -73,17 +73,12 @@ func newT(f func(chan struct{}) error) *T {
//@description: 添加任务
func (t *T) AddTask() {
if len(t.ch) == 1 {
return
}
t.Lock()
defer t.Unlock()
if len(t.ch) == 1 {
select {
case t.ch <- struct{}{}:
default:
// 代表已经有任务了
// 直接丢弃这次任务
return
}
t.ch <- struct{}{}
}
//@author: [songzhibin97](https://github.com/songzhibin97)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册