mirror of
https://github.com/navidrome/navidrome.git
synced 2026-08-01 07:21:17 +00:00
Make pool's queue buffered. Workaround while we don't put the queue in disk
This commit is contained in:
parent
26902d78df
commit
e87fb3a1cc
@ -13,12 +13,15 @@ type Pool struct {
|
||||
//queue *dque.DQue
|
||||
}
|
||||
|
||||
// TODO This hardcoded value will go away when the queue is persisted in disk
|
||||
const bufferSize = 10000
|
||||
|
||||
func NewPool(name string, workerCount int, item interface{}, exec Executor) (*Pool, error) {
|
||||
p := &Pool{
|
||||
name: name,
|
||||
item: item,
|
||||
exec: exec,
|
||||
queue: make(chan work),
|
||||
queue: make(chan work, bufferSize),
|
||||
end: make(chan bool),
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user