MCPcopy Create free account
hub / github.com/Super-long/ChubbyGo / fanIn

Function fanIn

BaseServer/concurrentHashMap.go:239–252  ·  view source on GitHub ↗

fanIn reads elements from channels `chans` into channel `out`

(chans []chan Tuple, out chan Tuple)

Source from the content-addressed store, hash-verified

237
238// fanIn reads elements from channels `chans` into channel `out`
239func fanIn(chans []chan Tuple, out chan Tuple) {
240 wg := sync.WaitGroup{}
241 wg.Add(len(chans))
242 for _, ch := range chans {
243 go func(ch chan Tuple) {
244 for t := range ch {
245 out <- t
246 }
247 wg.Done()
248 }(ch)
249 }
250 wg.Wait()
251 close(out)
252}
253
254// Returns all items as map[string]interface{}
255func (m ConcurrentHashMap) Items() map[string]interface{} {

Callers 2

IterMethod · 0.85
IterBufferedMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected