ax(mining): replace prose comment on NewTaskSupervisor with usage example
AX Principle 2: comments show HOW with real values, not WHAT the function name already says. All other constructors in the file already use usage-example comments; NewTaskSupervisor was the outlier. Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
parent
60997f79d2
commit
f32bf6f3ba
1 changed files with 3 additions and 1 deletions
|
|
@ -34,7 +34,9 @@ type TaskSupervisor struct {
|
|||
started bool
|
||||
}
|
||||
|
||||
// NewTaskSupervisor creates a new task supervisor.
|
||||
// supervisor := NewTaskSupervisor()
|
||||
// supervisor.RegisterTask("stats-collector", collectStats, 5*time.Second, -1)
|
||||
// supervisor.Start()
|
||||
func NewTaskSupervisor() *TaskSupervisor {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
return &TaskSupervisor{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue