func (m *Manager) Start(ctx context.Context, description string, e JobExec) int {
	m.mutex.Lock()
	defer m.mutex.Unlock()

	t := time.Now()

	j := Job{
		ID:          m.nextID(),
		Status:      StatusReady,
		Description: description,
		AddTime:     t,
		exec:        e,
		outerCtx:    ctx,
	}

	m.queue = append(m.queue, &j)

	m.dispatch(ctx, &j)

	return j.ID
}
// Start adds a job and starts it immediately, concurrently with any other
// jobs.
Start adds a job and starts it immediately, concurrently with any other
jobs.
// Start adds a job and starts it immediately concurrently with any other // jobs .
func (m *Manager) Start(ctx context.Context, description string, e JobExec) int {
	m.mutex.Lock()
	defer m.mutex.Unlock()
	t := time.Now()
	j := Job{
		ID:          m.nextID(),
		Status:      StatusReady,
		Description: description,
		AddTime:     t,
		exec:        e,
		outerCtx:    ctx,
	}
	m.queue = append(m.queue, &j)
	m.dispatch(ctx, &j)
	return j.ID
}
func ( m * Manager ) Start ( ctx context . Context , description string , e JobExec ) int { m . mutex . Lock ( ) defer m . mutex . Unlock ( ) t := time . Now ( ) j := Job { ID : m . nextID ( ) , Status : StatusReady , Description : description , AddTime : t , exec : e , outerCtx : ctx , } m . queue = append ( m . queue , & j ) m . dispatch ( ctx , & j ) return j . ID }
Start adds a job and starts it immediately, concurrently with any other
jobs.
Start adds a job and starts it immediately concurrently with any other jobs .