ax(mining): replace prose RegisterTask comment with usage example
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run

Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 07:58:45 +01:00
parent 248a413dae
commit edcee49435
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -44,8 +44,8 @@ func NewTaskSupervisor() *TaskSupervisor {
}
}
// RegisterTask registers a task for supervision.
// The task will be automatically restarted if it exits or panics.
// supervisor.RegisterTask("stats-collector", collectStats, 5*time.Second, -1)
// supervisor.RegisterTask("cleanup", runCleanup, 30*time.Second, 10)
func (s *TaskSupervisor) RegisterTask(name string, task TaskFunc, restartDelay time.Duration, maxRestarts int) {
s.mu.Lock()
defer s.mu.Unlock()