code: func (w *worker) updateTaskStatus(ctx context.Context, tx *bolt.Tx, taskID string, status *api.TaskStatus) error {
  	if err := PutTaskStatus(tx, taskID, status); err != nil {
  		log.G(ctx).WithError(err).Error("failed writing status to disk")
  		return err
  	}
  
  	// broadcast the task status out.
  	for key := range w.listeners {
  		if err := key.StatusReporter.UpdateTaskStatus(ctx, taskID, status); err != nil {
  			log.G(ctx).WithError(err).Errorf("failed updating status for reporter %v", key.StatusReporter)
  		}
  	}
  
  	return nil
  }
docs: // updateTaskStatus reports statuses to listeners, read lock must be held.