Skip to content

Commit

Permalink
sync: only use a lock in the Map implementation when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
aykevl committed Nov 22, 2024
1 parent 118620b commit 3530747
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/sync/map.go
Original file line number Diff line number Diff line change
@@ -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{}
}

Expand Down

0 comments on commit 3530747

Please sign in to comment.