3 ms·
Maybe I'm missing something, but that is how I'm doing it. The Queue struct has a 'Queue.Jobs chan string' that is the public method for adding to the "Queue" a
by Xeoncross 10y ago
Maybe I'm missing something, but that is how I'm doing it. The Queue struct has a 'Queue.Jobs chan string' that is the public method for adding to the "Queue" and then the go worker()'s read from that buffered channel.
Basically, this simple Queue just adds some niceties around a buffered channel X number of go func() are reading from.
- gravypod 10y agoOk well then can you back it by a linked list? That way there is no size.