Exemplo n.º 1
0
func buildMapSeries2(size int) concurrentmap.ConcurrentMap {
	cMap := concurrentmap.ConcurrentMap2{}
	cMap.ConstructMap(size)

	for i := 0; i < numberOfTests; i++ {
		s := strconv.Itoa(i)
		cMap.Put(s, s)
	}
	return &cMap
}
Exemplo n.º 2
0
func buildMapConcurrent2(size int, threads int, done chan int64) concurrentmap.ConcurrentMap {

	cMap := concurrentmap.ConcurrentMap2{}
	cMap.ConstructMap(size)

	for i := 0; i < threads; i++ {
		go writeConcurrent(&cMap, threads, i, done)
	}

	return &cMap
}