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