sync: only use a lock in the Map implementation when needed

This commit is contained in:
Ayke van Laethem
2024-10-28 16:02:14 +01:00
committed by Ron Evans
parent 8d04821639
commit 79164dae71
+3 -1
View File
@@ -1,10 +1,12 @@
package sync
import "internal/task"
// This file implements just enough of sync.Map to get packages to compile. It
// is no more efficient than a map with a lock.
type Map struct {
lock Mutex
lock task.PMutex
m map[interface{}]interface{}
}