func (p *Progress) Stop() {
	if p.IsRenderInProgress() {
		p.done <- true
	}
}
Stop stops the Render() logic that is in progress.
package progress
import (
	"io"
	"os"
	"sync"
	"time"
	"unicode/utf8"
)
var (
	DefaultLengthTracker = 20
	DefaultUpdateFrequency = time.Millisecond * 250
)
type Progress struct {
	autoStop              bool
	done                  chan bool
	lengthTracker         int
	lengthProgress        int
	outputWriter          io.Writer
	hideTime              bool
	hideTracker           bool
	hideValue             bool
	hidePercentage        bool
	messageWidth          int
	numTrackersExpected   int64
	overallTracker        *Tracker
	overallTrackerMutex   sync.RWMutex
	renderInProgress      bool
	renderInProgressMutex sync.RWMutex
	showETA               bool
	showOverallTracker    bool
	sortBy                SortBy
	style                 *Style
	trackerPosition       Position
	trackersActive        []*Tracker
	trackersActiveMutex   sync.RWMutex
	trackersDone          []*Tracker
	trackersDoneMutex     sync.RWMutex
	trackersInQueue       []*Tracker
	trackersInQueueMutex  sync.RWMutex
	updateFrequency       time.Duration
}
type Position int
const (
	PositionLeft Position = iota
	PositionRight
)
func (p *Progress) AppendTracker(t *Tracker) {
	t.start()
	p.overallTrackerMutex.Lock()
	if p.overallTracker == nil {
		p.overallTracker = &Tracker{Total: 1}
		if p.numTrackersExpected > 0 {
			p.overallTracker.Total = p.numTrackersExpected * 100
		}
		p.overallTracker.start()
	}
	p.trackersInQueueMutex.Lock()
	p.trackersInQueue = append(p.trackersInQueue, t)
	p.trackersInQueueMutex.Unlock()
	p.overallTracker.mutex.Lock()
	if p.overallTracker.Total < int64(p.Length())*100 {
		p.overallTracker.Total = int64(p.Length()) * 100
	}
	p.overallTracker.mutex.Unlock()
	p.overallTrackerMutex.Unlock()
}
func (p *Progress) AppendTrackers(trackers []*Tracker) {
	for _, tracker := range trackers {
		p.AppendTracker(tracker)
	}
}
func (p *Progress) IsRenderInProgress() bool {
	p.renderInProgressMutex.RLock()
	defer p.renderInProgressMutex.RUnlock()
	return p.renderInProgress
}
func (p *Progress) Length() int {
	p.trackersActiveMutex.RLock()
	p.trackersDoneMutex.RLock()
	p.trackersInQueueMutex.RLock()
	out := len(p.trackersInQueue) + len(p.trackersActive) + len(p.trackersDone)
	p.trackersInQueueMutex.RUnlock()
	p.trackersDoneMutex.RUnlock()
	p.trackersActiveMutex.RUnlock()
	return out
}
func (p *Progress) LengthActive() int {
	p.trackersActiveMutex.RLock()
	p.trackersInQueueMutex.RLock()
	out := len(p.trackersInQueue) + len(p.trackersActive)
	p.trackersInQueueMutex.RUnlock()
	p.trackersActiveMutex.RUnlock()
	return out
}
func (p *Progress) LengthDone() int {
	p.trackersDoneMutex.RLock()
	out := len(p.trackersDone)
	p.trackersDoneMutex.RUnlock()
	return out
}
func (p *Progress) LengthInQueue() int {
	p.trackersInQueueMutex.RLock()
	out := len(p.trackersInQueue)
	p.trackersInQueueMutex.RUnlock()
	return out
}
func (p *Progress) SetAutoStop(autoStop bool) {
	p.autoStop = autoStop
}
func (p *Progress) SetMessageWidth(width int) {
	p.messageWidth = width
}
func (p *Progress) SetNumTrackersExpected(numTrackers int) {
	p.numTrackersExpected = int64(numTrackers)
}
func (p *Progress) SetOutputWriter(writer io.Writer) {
	p.outputWriter = writer
}
func (p *Progress) SetSortBy(sortBy SortBy) {
	p.sortBy = sortBy
}
func (p *Progress) SetStyle(style Style) {
	p.style = &style
}
func (p *Progress) SetTrackerLength(length int) {
	p.lengthTracker = length
}
func (p *Progress) SetTrackerPosition(position Position) {
	p.trackerPosition = position
}
func (p *Progress) SetUpdateFrequency(frequency time.Duration) {
	p.updateFrequency = frequency
}
func (p *Progress) ShowETA(show bool) {
	p.showETA = show
}
func (p *Progress) ShowPercentage(show bool) {
	p.hidePercentage = !show
}
func (p *Progress) ShowOverallTracker(show bool) {
	p.showOverallTracker = show
}
func (p *Progress) ShowTime(show bool) {
	p.hideTime = !show
}
func (p *Progress) ShowTracker(show bool) {
	p.hideTracker = !show
}
func (p *Progress) ShowValue(show bool) {
	p.hideValue = !show
}