code: func (e *Executor) PollForNumberRunning(taskID platform.ID, count int) ([]*RunPromise, error) {
  	const numAttempts = 20
  	var running []*RunPromise
  	for i := 0; i < numAttempts; i++ {
  		if i > 0 {
  			time.Sleep(10 * time.Millisecond)
  		}
  		running = e.RunningFor(taskID)
  		if len(running) == count {
  			return running, nil
  		}
  	}
  	return nil, fmt.Errorf("did not see count of %d running task(s) for ID %s in time; last count was %d", count, taskID.String(), len(running))
  }
docs: // PollForNumberRunning blocks for a small amount of time waiting for exactly the given count of active runs for the given task ID.
  // If the expected number isn't found in time, it returns an error.
  //
  // Because the scheduler and executor do a lot of state changes asynchronously, this is useful in test.