// == Movement
// start moves the cursor at the start.
972321
func (b *buffer) start() (err error) {
	if b.pos == b.promptLen {
		return
	}

	for ln, _ := b.pos2xy(b.pos); ln > 0; ln-- {
		if _, err = term.Output.Write(CursorUp); err != nil {
			return outputError(err.Error())
		}
	}

	if _, err = fmt.Fprintf(term.Output, "\r\033[%dC", b.promptLen); err != nil {
		return outputError(err.Error())
	}
	b.pos = b.promptLen
	return
}
562981
func (buf *Buffer) Start() error {
	if buf.pos <= 0 {
		return nil
	}

	buf.pos = 0
	return buf.Refresh()
}
431073
func (sit *SyncIntervalTimer) Start() {
	if sit.intervalTimer == nil {
	exitA:
		for {
			select {
			case sit.sync <- struct{}{}:
				<-sit.sync
			case <-sit.stop:
				break exitA
			}
		}
	} else {
	exitB:
		for {
			select {
			case <-sit.intervalTimer.C:
				if err := sit.f(); err != nil {
					if sit.onError != nil {
						sit.onError(err)
					}
				}
				select {
				case <-sit.stop:
					break exitB
				default:
				}
			case sit.sync <- struct{}{}:
				<-sit.sync
			case <-sit.stop:
				break exitB
			}
		}
	}
	close(sit.sync)
}
246582
func Start() {
	connect()
	go startBatcher(commonBatchStream)

	for i := range registry {
		debug("starting", registry[i])
		go registry[i].StartLoop()
	}
}
1126200
func (c *SearchCall) StartCursor(startCursor string) *SearchCall {
	c.urlParams_.Set("start_cursor", startCursor)
	return c
}
490810
func (ls *LightStepSpanSink) Start(cl *trace.Client) error {
	ls.traceClient = cl
	return nil
}
679457
func (c *Cron) Start() {
	if c.running {
		return
	}
	c.running = true
	go c.run()
}
67143
func (s *Statement) SetStartPosition(v *Position) *Statement {
	s.StartPosition = v
	return s
}
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
			}
		}
	}
}
511063
func (b *AccelerometerDriver) Start() (err error) {
	// subscribe to accelerometer notifications
	b.adaptor().Subscribe(accelerometerCharacteristic, func(data []byte, e error) {
		a := &RawAccelerometerData{X: 0, Y: 0, Z: 0}

		buf := bytes.NewBuffer(data)
		binary.Read(buf, binary.LittleEndian, &a.X)
		binary.Read(buf, binary.LittleEndian, &a.Y)
		binary.Read(buf, binary.LittleEndian, &a.Z)

		result := &AccelerometerData{
			X: float32(a.X) / 1000.0,
			Y: float32(a.Y) / 1000.0,
			Z: float32(a.Z) / 1000.0}

		b.Publish(b.Event(Accelerometer), result)
	})

	return
}
286236
func (e *emitter) Start() {
	if !e.started {
		e.started = true
		e.wg.Add(1)
		go e.startEventListener(&e.wg)
	}
}
979959
func (u *UpdateChecker) Start() bool {
	if u.ticker != nil {
		return false
	}
	u.ticker = time.NewTicker(u.tickDuration)
	go func() {
		// If we haven't done an update recently, check now.
		// If there is an error getting the last update time, we don't trigger a
		// check and let the ticker below trigger it.
		if !u.updater.config.IsLastUpdateCheckTimeRecent(u.tickDuration) {
			u.Check()
		}

		u.log.Debugf("Starting (ticker %s)", u.tickDuration)
		for range u.ticker.C {
			u.log.Debugf("%s", "Checking for update (ticker)")
			u.Check()
		}
	}()
	return true
}
428136
func (r *runner) Start() error {
	// Delegates must be added before starting if none exist
	// then this Runner can do nothing and should not start.
	if len(r.delegates) == 0 {
		return errors.New("No delegates added before called Start()")
	}

	// For each delegate register needed handlers
	for _, del := range r.delegates {
		e := del.RegisterHandler(HandlerRegistrationName, r)
		if e != nil {
			return e
		}
	}

	// Start the monitor
	r.monitor.Start(r.availablePlugins)
	runnerLog.WithFields(log.Fields{
		"_block": "start",
	}).Debug("started")
	return nil
}
105028
func (q *CtxQueue) Start(fn func(p interface{})) {
	// Make sure the queue can only be started once
	q.o.Do(func() {
		// Reset ctx
		atomic.StoreUint32(&q.ctxIsDone, 0)

		// Broadcast
		q.startC.L.Lock()
		q.startC.Broadcast()
		atomic.StoreUint32(&q.hasStarted, 1)
		q.startC.L.Unlock()

		// Wait is starting
		q.statListen.Add(true)

		// Loop
		for {
			select {
			case m := <-q.c:
				// Wait is done
				q.statListen.Done(true)

				// Check context
				if m.ctxIsDone {
					return
				}

				// Handle payload
				fn(m.p)

				// Broadcast the fact that the process is done
				m.c.L.Lock()
				m.c.Broadcast()
				m.c.L.Unlock()

				// Wait is starting
				q.statListen.Add(true)
			}
		}
	})
}
642614
func (c *PeekCall) StartCursor(startCursor string) *PeekCall {
	c.urlParams_.Set("start_cursor", startCursor)
	return c
}
368799
func (t *FixedInterval) Start() bool {
	t.Lock()
	defer t.Unlock()

	// If the timer is already started or uninitialized return false.
	if t.running() || !t.initialized {
		return false
	}

	// Create the new timer with the delay
	t.timer = time.AfterFunc(t.GetDelay(), t.action)
	return true
}
261999
func (m *Monitor) Start() {
	monitorStopFunc := func(monitorFunc func() error) func(stopSignal chan struct{}) {
		return func(stopSignal chan struct{}) {
			for {
				select {
				case <-stopSignal:
					return
				default:
					monitorFunc()
				}
			}
		}
	}

	monitorSerial := monitorStopFunc(m.serialDiscover)
	monitorNetwork := monitorStopFunc(m.networkDiscover)

	m.stoppable = cc.Run(monitorSerial, monitorNetwork)
}