]> Cypherpunks repositories - gostls13.git/commit
runtime: make map reads multithreaded safe.
authorKeith Randall <khr@golang.org>
Tue, 2 Apr 2013 01:59:58 +0000 (18:59 -0700)
committerKeith Randall <khr@golang.org>
Tue, 2 Apr 2013 01:59:58 +0000 (18:59 -0700)
commit0e7144a875aae64a0029c7cbbd1b7fa2d5e7f691
tree17d3e648854a74ddce77115d4198d6c0c38c12ff
parentb91ae5c27c3b21e8364a7dec732d7885ce6a2073
runtime: make map reads multithreaded safe.

Doing grow work on reads is not multithreaded safe.
Changed code to do grow work only on inserts & deletes.

This is a short-term fix, eventually we'll want to do
grow work in parallel to recover the space of the old
table.

Fixes #5120.

R=bradfitz, khr
CC=golang-dev
https://golang.org/cl/8242043
src/cmd/gc/range.c
src/pkg/runtime/hashmap.c
src/pkg/runtime/hashmap_fast.c
src/pkg/runtime/map_test.go