// Start starts a Go routine to run the registered tasks.
Start starts a Go routine to run the registered tasks.
// Start starts a Go routine to run the registered tasks .
func (m *TaskManager) start() {
	ticker := time.NewTicker(m.interval)
	go func() {
		for {
			select {
			case <-m.done:
				return
			case <-ticker.C:
				m.mutex.RLock()
				for _, task := range m.tasks {
					task.start()
				}
				m.mutex.RUnlock()
			}
		}
	}()
}
func ( m * TaskManager ) start ( ) { ticker := time . NewTicker ( m . interval ) go func ( ) { for { select { case <- m . done : return case <- ticker . C : m . mutex . RLock ( ) for _ , task := range m . tasks { task . start ( ) } m . mutex . RUnlock ( ) } } } ( ) }
Start starts a Go routine to run the registered tasks.
Start starts a Go routine to run the registered tasks .