온도 락걸리는 문제 수정
This commit is contained in:
parent
dd5ab35273
commit
2d0aaf58a5
|
@ -177,8 +177,7 @@ func (p *processor) getMaxTempetureOnProcessor(tempeturePathGlob string) (maxTem
|
|||
}
|
||||
|
||||
tempetureReadWaiter := &sync.WaitGroup{}
|
||||
queue := make(chan float64, len(matches))
|
||||
defer close(queue)
|
||||
queue := make(chan float64, len(matches)-1)
|
||||
|
||||
// exclude package temp
|
||||
for _, tempetureFilePath := range matches[1:] {
|
||||
|
@ -186,6 +185,7 @@ func (p *processor) getMaxTempetureOnProcessor(tempeturePathGlob string) (maxTem
|
|||
go p.readTempeture(tempetureFilePath, queue, tempetureReadWaiter)
|
||||
}
|
||||
tempetureReadWaiter.Wait()
|
||||
close(queue)
|
||||
for sense := range queue {
|
||||
if maxTempeture < sense {
|
||||
maxTempeture = sense
|
||||
|
|
Loading…
Reference in New Issue