concurrent routines http://blog.golang.org/go-maps-in-action#Concurrency
Now if I create a map
aMap := make(map[int][]string)
Then create some X routines. Many routines write to the maps however each
routine ALWAYS adds new element to the map and would NEVER modify existing.
After that they will send keys over a channel.
There is one single routine that reads keys on this channel and accesses
map for the values corresponding to passed keys and once done delete the
key value entry from the map.
If none of the routines modify a value that other routines do, I still need
a lock? Also the delete is when we are sure no one would read the key's
value or modify it.
map[int][]string<-------------------reads &
remove<---------------------------
^
X
routines---------------------------------------------------------------[keys]---------------------->
ch-----------------> reader routine
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.