diff --git a/core/pool/pool.go b/core/pool/pool.go index 6184fd799..885d8f6e6 100644 --- a/core/pool/pool.go +++ b/core/pool/pool.go @@ -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), }