Skip to content

Commit 7d8b9b7

Browse files
committed
sync: only use a lock in the Map implementation when needed
1 parent c1aaf11 commit 7d8b9b7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/sync/map.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
package sync
22

3+
import "internal/llsync"
4+
35
// This file implements just enough of sync.Map to get packages to compile. It
46
// is no more efficient than a map with a lock.
57

68
type Map struct {
7-
lock Mutex
9+
lock llsync.PMutex
810
m map[interface{}]interface{}
911
}
1012

0 commit comments

Comments
 (0)