优化缓存数据库相关代码

This commit is contained in:
刘祥超
2023-07-08 20:00:27 +08:00
parent a2f7511a46
commit d0610a5001
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)