go_above_19.go 209 B

123456789101112131415
  1. //+build go1.9
  2. package concurrent
  3. import "sync"
  4. // Map is a wrapper for sync.Map introduced in go1.9
  5. type Map struct {
  6. sync.Map
  7. }
  8. // NewMap creates a thread safe Map
  9. func NewMap() *Map {
  10. return &Map{}
  11. }