github.com/hsfzxjy/dgo/go@v0.2.0/pin/table.go (about)

     1  package pin
     2  
     3  import (
     4  	"sync/atomic"
     5  
     6  	"github.com/puzpuzpuz/xsync/v2"
     7  )
     8  
     9  type _pinTable struct {
    10  	m           *xsync.MapOf[uintptr, *Meta]
    11  	nextVersion atomic.Uint32
    12  }
    13  
    14  var pinTable _pinTable
    15  
    16  func init() {
    17  	pinTable.m = xsync.NewIntegerMapOf[uintptr, *Meta]()
    18  }