8 // WaitingTask represents a task for which the total number of items to do work
10 type WaitingTask struct {
11 // ch is used to transmit task updates.
15 // NewWaitingTask returns a new *WaitingTask.
16 func NewWaitingTask(msg string) *WaitingTask {
17 ch := make(chan *Update, 1)
19 S: fmt.Sprintf("%s: ...", msg),
23 return &WaitingTask{ch: ch}
26 // Complete marks the task as completed.
27 func (w *WaitingTask) Complete() {
31 // Done implements Task.Done and returns a channel which is closed when
32 // Complete() is called.
33 func (w *WaitingTask) Updates() <-chan *Update {
37 // Throttled implements Task.Throttled and returns true, indicating that this
39 func (w *WaitingTask) Throttled() bool { return true }