aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sync/map_go123.go
blob: b7bd61e1032181d4a9f68bd0470ca9c696259327 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//go:build go1.23

package sync

// Go 1.23 added the Clear() method. The clear() function is added in Go 1.21,
// so this method can be moved to map.go once we drop support for Go 1.20 and
// below.

func (m *Map) Clear() {
	m.lock.Lock()
	defer m.lock.Unlock()
	clear(m.m)
}