Skip to content
Myr

fix: renderer only stops once

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

Ensure the tea renderer can be stopped and restarted more than once.

authored by Christian Muehlhaeuser · committed by Christian Muehlhaeuser · parent 32e3027 · Browse files · 1 file+5 added−0 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+5 added−0 removed

  • other:+5 added−0 removed

1 file+5 added−0 removed

modified:standard_renderer.go+5 added
71 unmodified lines
72func (r *standardRenderer) start() {73 if r.ticker == nil {74 r.ticker = time.NewTicker(r.framerate)75 }7677 // Since the renderer can be restarted after a stop, we need to reset78 // the done channel and its corresponding sync.Once.79 r.once = sync.Once{}80 r.done = make(chan struct{})8182 go r.listen()83}8485// stop permanently halts the renderer, rendering the final frame.
570 unmodified lines