This commit is contained in:
aozhiwei 2024-11-16 15:05:51 +08:00
parent 41674f892a
commit b8ccbdd770

View File

@ -30,9 +30,12 @@ func (this *log) unInit() {
func (this *log) saveToDb() { func (this *log) saveToDb() {
for true { for true {
this.loopCond.L.Lock() this.logQueue.Fetch()
this.loopCond.Wait() if this.logQueue.IsEmpty() {
this.loopCond.L.Unlock() this.loopCond.L.Lock()
this.loopCond.Wait()
this.loopCond.L.Unlock()
}
} }
} }