// Start starts all the goroutines required for the SubscriptionManager to carry
// out its duties.
778741
func (m *SubscriptionManager) Start() {
	if atomic.AddInt32(&m.started, 1) != 1 {
		return
	}

	log.Debug("Starting block notifications subscription manager")

	m.wg.Add(1)
	go m.subscriptionHandler()
}
357342
func (s *Service) Start(ctx context.Context, r *shimapi.StartRequest) (*shimapi.StartResponse, error) {
	p, err := s.getExecProcess(r.ID)
	if err != nil {
		return nil, err
	}
	if err := p.Start(ctx); err != nil {
		return nil, err
	}
	return &shimapi.StartResponse{
		ID:  p.ID(),
		Pid: uint32(p.Pid()),
	}, nil
}
227739
func (s *Server) Start() error {
	if s.config.Listener == nil {
		err := s.config.InitListener()
		if err != nil {
			return err
		}
	}
	s.config.Print(`standard`)
	return s.Serve(s.config.Listener)
}
879612
func (l *Lifecycle) Start(ctx context.Context) error {
	for _, hook := range l.hooks {
		if hook.OnStart != nil {
			l.logger.Printf("START\t\t%s()", hook.caller)
			if err := hook.OnStart(ctx); err != nil {
				return err
			}
		}
		l.numStarted++
	}
	return nil
}
1273257
func (m *wsNotificationManager) Start() {
	m.wg.Add(2)
	go m.queueHandler()
	go m.notificationHandler()
}
136998
func (wm *WorkerManager) Start() {
	go wm.processBatch()
	go wm.commitBatch()
	for {
		startIdle := time.Now()
		// force manager stop to be checked first
		select {
		case <-wm.managerStop:
			return
		default:
			select {
			case batch := <-wm.inputChannel:
				{
					wm.metrics.wMsIdle().Update(time.Since(startIdle))
					if Logger.IsAllowed(TraceLevel) {
						Trace(wm, "WorkerManager got batch")
					}
					wm.metrics.wMsBatchDuration().Time(func() {
						wm.startBatch(batch)
					})
					if Logger.IsAllowed(TraceLevel) {
						Trace(wm, "WorkerManager got batch processed")
					}
				}
			case <-wm.managerStop:
				return
			}
		}
	}
}
290231
func (rw *GCS) Start() error {
	ctx := context.Background()
	var client *storage.Client
	var err error

	if len(rw.ServiceAccountKey) > 0 {
		opt := option.WithServiceAccountFile(rw.ServiceAccountKey)
		client, err = storage.NewClient(ctx, opt)
	} else {
		client, err = storage.NewClient(ctx)
	}

	if err != nil {
		return err
	}
	rw.bucket = client.Bucket(rw.Bucket)
	return nil
}
1321196
func (c *containerLogManager) Start() {
	// Start a goroutine periodically does container log rotation.
	go wait.Forever(func() {
		if err := c.rotateLogs(); err != nil {
			klog.Errorf("Failed to rotate container logs: %v", err)
		}
	}, logMonitorPeriod)
}
790322
func (r *Runner) Start() {
	r.lock.Lock()
	defer r.lock.Unlock()
	if r.stop == nil {
		c := make(chan struct{})
		r.stop = &c
		for i := range r.loopFuncs {
			go r.loopFuncs[i](*r.stop)
		}
	}
}
229515
func (s *Server) Start() error {
	if atomic.AddInt32(&s.started, 1) != 1 {
		return nil
	}

	return s.manager.Start()
}
1067569
func (s *service) Start(ctx context.Context, r *taskAPI.StartRequest) (*taskAPI.StartResponse, error) {
	container, err := s.getContainer()
	if err != nil {
		return nil, err
	}

	// hold the send lock so that the start events are sent before any exit events in the error case
	s.eventSendMu.Lock()
	p, err := container.Start(ctx, r)
	if err != nil {
		s.eventSendMu.Unlock()
		return nil, errdefs.ToGRPC(err)
	}
	if err := s.ep.Add(container.ID, container.Cgroup()); err != nil {
		logrus.WithError(err).Error("add cg to OOM monitor")
	}
	switch r.ExecID {
	case "":
		s.send(&eventstypes.TaskStart{
			ContainerID: container.ID,
			Pid:         uint32(p.Pid()),
		})
	default:
		s.send(&eventstypes.TaskExecStarted{
			ContainerID: container.ID,
			ExecID:      r.ExecID,
			Pid:         uint32(p.Pid()),
		})
	}
	s.eventSendMu.Unlock()
	return &taskAPI.StartResponse{
		Pid: uint32(p.Pid()),
	}, nil
}
13514
func (s Service) Start() error {
	running, err := s.Running()
	if err != nil {
		return errors.Trace(err)
	}
	if running {
		return nil
	}

	commands, err := s.StartCommands()
	if err != nil {
		return errors.Trace(err)
	}
	for _, command := range commands {
		commandParts := strings.Fields(command)
		out, err := utils.RunCommand(commandParts[0], commandParts[1:]...)
		if err != nil {
			if strings.Contains(out, "has no services") {
				continue
			}
			return errors.Annotatef(err, "%v -> %v", command, out)
		}
	}

	return nil
}
384397
func (m *Monitor) Start(c *exec.Cmd) (chan runc.Exit, error) {
	ec := m.Subscribe()
	if err := c.Start(); err != nil {
		m.Unsubscribe(ec)
		return nil, err
	}
	return ec, nil
}
1141442
func (p *Init) Start(ctx context.Context) error {
	p.mu.Lock()
	defer p.mu.Unlock()

	return p.initState.Start(ctx)
}
634626
func (r *runner) Start() {
	if !atomic.CompareAndSwapUint32(r.state, runnerIdle, runnerWorking) {
		// Already working. Cannot start.
		return
	}

	r.startFromWorking(atomic.LoadInt64(r.ts.now))
}
311204
func (this *BufferedWriter) Start() {
	go func() {
		defer close(this.done)
		for {
			select {
			case item, ok := <-this.queue:
				if !ok {
					return
				}
				this.Writer.Write(item)
			}
		}
	}()
}
857704
func (s *RTMService) Start() *RTMStartCall {
	var call RTMStartCall
	call.service = s
	return &call
}