This commit is contained in:
aozhiwei 2024-04-26 13:24:04 +08:00
parent 0ec6d9a142
commit 4f7255c731

View File

@ -30,3 +30,12 @@ func (this *Queue) Fetch() {
} }
} }
} }
func (this *Queue) IsEmpty() bool {
if !this.WorkList.Empty() {
return false
}
this.msgMutex.Lock()
defer this.msgMutex.Unlock()
return this.msgList.Empty()
}