Пример #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
}
Пример #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
}