优化缓存数据库相关代码

This commit is contained in:
GoEdgeLab
2023-07-08 20:00:27 +08:00
parent 774529de6d
commit c2d336fb2e
3 changed files with 22 additions and 70 deletions

View File

@@ -31,7 +31,7 @@ func NewBatch(db *DB, n int) *Batch {
var batch = &Batch{
db: db,
n: n,
queue: make(chan *batchItem),
queue: make(chan *batchItem, 16),
closeEvent: make(chan bool, 1),
}
db.batches = append(db.batches, batch)