MCPcopy Index your code
hub / github.com/abiosoft/ishell / Start

Method Start

progress.go:155–180  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

153}
154
155func (p *progressBarImpl) Start() {
156 p.Lock()
157 p.running = true
158 p.wait = make(chan struct{})
159 p.Unlock()
160
161 go func() {
162 for {
163 var running, indeterminate bool
164 p.Lock()
165 running = p.running
166 indeterminate = p.indeterminate
167 p.Unlock()
168
169 if !running {
170 break
171 }
172 time.Sleep(p.interval)
173 if indeterminate {
174 p.refresh()
175 }
176 }
177 p.done()
178 close(p.wait)
179 }()
180}
181
182func (p *progressBarImpl) Stop() {
183 p.Lock()

Callers

nothing calls this directly

Calls 2

refreshMethod · 0.95
doneMethod · 0.95

Tested by

no test coverage detected