From 79164dae71d5af32d316a5fc1dc5c996f04cc0f1 Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Mon, 28 Oct 2024 16:02:14 +0100 Subject: sync: only use a lock in the Map implementation when needed --- src/sync/map.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sync/map.go b/src/sync/map.go index f27450ce5..cd8a1967d 100644 --- a/src/sync/map.go +++ b/src/sync/map.go @@ -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{} } -- cgit v1.2.3