Skip to content
Myr

Remove redundant lock in listen

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Kiyon · committed by Christian Muehlhaeuser · parent 1ee4050 · Browse files · 1 file+1 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−4 removed

  • other:+1 added−4 removed

1 file+1 added−4 removed

modified:standard_renderer.go+1 added-4 removed
63 unmodified lines
64// stop permanently halts the renderer.65func (r *standardRenderer) stop() {66 r.flush()67 clearLine(r.out)68 r.done <- struct{}{}68 close(r.done)69}7071// listen waits for ticks on the ticker, or a signal to stop the renderer.72func (r *standardRenderer) listen() {
3 unmodified lines
76 if r.ticker != nil {77 r.flush()78 }79 case <-r.done:80 r.mtx.Lock()80 r.ticker.Stop()81 r.ticker = nil83 r.mtx.Unlock()84 close(r.done)82 return83 }84 }85}
313 unmodified lines