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:
Claude 2026-04-02 09:29:25 +01:00
parent cc8eeab231
commit a862480862
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -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