type WorkQueue struct {
getStatus chan WorkQueueStatus
newlist chan *list.List
// Workers get work items by reading from this channel.
NextItem <-chan interface{}
type WorkQueue struct {
getStatus chan WorkQueueStatus
newlist chan *list.List
// Workers get work items by reading from this channel.
NextItem <-chan interface{}
// for each work item received from NextItem, when it stops
// working on that item (regardless of whether the work was
// successful).
// for each work item received from NextItem, when it stops
// working on that item (regardless of whether the work was
// successful).
- getStatus: make(chan WorkQueueStatus),
- newlist: newList,
- NextItem: nextItem,
- ReportDone: reportDone,
+ getStatus: make(chan WorkQueueStatus),
+ newlist: newList,
+ NextItem: nextItem,
+ DoneItem: reportDone,