parallel-letter-frequency: false positive on 'wait for goroutines'
- Dominant language
- Go
- Stars
- 33
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Description
Solution [7ae34b6188784d06a7fd50faa6872bba](https://exercism.io/mentor/solutions/7ae34b6188784d06a7fd50faa6872bba) is fine:
```go
func ConcurrentFrequency(strings []string) FreqMap {
results := make(chan FreqMap)
m := FreqMap{}
for _, currentString := range strings {
go func(text string) {
results <- Frequency(text)
}(currentString)
}
for range strings {
for k, v := range <-results {
m[k] += v
}
}
return m
}
```
but Exalysis thinks it's waiting for the goroutines to be done [most definitely my fault]:
```
Here is one thought for further improvement:
- It looks like you wait until all results have been received from the goroutines before starting to merge them. In fact, you can (and should) start processing as soon as you receive the first result.
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.