Skip to content

Commit 79164da

Browse files
aykevldeadprogram
authored andcommitted
sync: only use a lock in the Map implementation when needed
1 parent 8d04821 commit 79164da

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/task"
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 task.PMutex
810
m map[interface{}]interface{}
911
}
1012

0 commit comments

Comments
 (0)