workq icon indicating copy to clipboard operation
workq copied to clipboard

Number of workers

Open narup opened this issue 9 years ago • 1 comments

Hi There, This project looks really interesting. One thing I didn't see is - the ability to control or configure number of workers, mostly curious about controlling number of goroutines it will spin

Thanks

narup avatar Mar 30 '17 22:03 narup

@narup So the worker control is actually up to you and is manually controlled by how many workers you explicitly spin up with the help of a client such as go-workq: https://github.com/iamduo/go-workq#worker-commands. The workq server will happily accept as many worker connections as you give it.

The go-workq client works in a serial fashion and does not spin up any additional goroutines. It is up to the user to decide how they want to enable concurrency of a worker. There are a few different ways to go about this also within Go.

What you may be looking for/interested in is some type of higher level "Worker Library" that sits above the go-workq client that has already defined a concurrency strategy and allows you to wrap your user defined worker. This does not exist yet.

Let me know if you have any questions still or have a use case I can help address.

iamduo avatar Mar 31 '17 04:03 iamduo