Re: [go-nuts] Question about iterator implementation of golang map

2019-07-15 Thread Jan Mercl
On Mon, Jul 15, 2019 at 4:39 PM Aaron Lau wrote: > We won't update the map during the traversal process. So why use mapaccessK > to find the k & v again ? The comment explains that very clearly: > // The hash table has grown since the iterator was started. > // The golden data for this key is

[go-nuts] Question about iterator implementation of golang map

2019-07-15 Thread Aaron Lau
Question: Where In function mapiternext Why We won't update the map during the traversal process. So why use mapaccessK to find the k & v again ? if (b.tophash[offi] != evacuatedX && b.tophash[offi] != evacuatedY) || !(t.reflexivekey() || alg.equal(k, k)) { // This is the golden data, we can