ax(mining): replace prose comment on Stop with usage example
AX principle 2: comments show HOW with concrete usage, not WHAT the signature already says. The old two-line prose comment restated the function name verbatim; replaced with a defer call example. Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
parent
cc8eeab231
commit
a862480862
1 changed files with 1 additions and 2 deletions
|
|
@ -696,8 +696,7 @@ func (m *Manager) GetMinerHashrateHistory(name string) ([]HashratePoint, error)
|
|||
// ShutdownTimeout is the maximum time to wait for goroutines during shutdown
|
||||
const ShutdownTimeout = 10 * time.Second
|
||||
|
||||
// Stop stops all running miners, background goroutines, and closes resources.
|
||||
// Safe to call multiple times - subsequent calls are no-ops.
|
||||
// defer manager.Stop() // safe in main() or test cleanup; subsequent calls are no-ops
|
||||
func (m *Manager) Stop() {
|
||||
m.stopOnce.Do(func() {
|
||||
// Stop all running miners first
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue