func Start[T any]()

in task.go [107:124]


func Start[T any](ctx context.Context, task AsyncFunc[T]) *Task[T] {
	ctx, cancel := context.WithCancel(ctx)
	wg := &sync.WaitGroup{}
	wg.Add(1)
	mutex := &sync.RWMutex{}

	record := &Task[T]{
		state:      StateRunning,
		result:     *new(T),
		cancelFunc: cancel,
		waitGroup:  wg,
		mutex:      mutex,
	}

	go runAndTrackGenericTask(ctx, record, task)

	return record
}