func (m ConcurrentHashMap) Pop(key string) (v interface{}, exists bool) {
	shard := m.GetShard(key)
	shard.Lock()
	v, exists = shard.items[key]
	delete(shard.items, key)
	shard.Unlock()
	return v, exists
}
Removes an element from the map and returns it
package BaseServer
import (
	"encoding/json"
	"github.com/xxhash"
	"sync"
	"unsafe"
)
func str2sbyte(s string) (b []byte) {
	*(*string)(unsafe.Pointer(&b)) = s                                                   
	*(*int)(unsafe.Pointer(uintptr(unsafe.Pointer(&b)) + 2*unsafe.Sizeof(&b))) = len(s)  
	return
}
var SHARD_COUNT = 32
type ConcurrentHashMap struct {
	ThreadSafeHashMap []*ConcurrentMapShared
	NowKeyNumber uint64
	BucketNumber uint32
}
type ConcurrentMapShared struct {
	items        map[string]interface{}
	sync.RWMutex
}
func NewConcurrentMap() *ConcurrentHashMap {
	Map := ConcurrentHashMap{}
	Map.ThreadSafeHashMap = make([]*ConcurrentMapShared, SHARD_COUNT)
	for i := 0; i < SHARD_COUNT; i++ {
		Map.ThreadSafeHashMap[i] = &ConcurrentMapShared{items: make(map[string]interface{})}
	}
	Map.NowKeyNumber = 0
	Map.BucketNumber = uint32(SHARD_COUNT)
	return &Map
}
func (m ConcurrentHashMap) GetShard(key string) *ConcurrentMapShared {
	return m.ThreadSafeHashMap[uint(xxhash_key(key))%uint(m.BucketNumber)]
}
func (m ConcurrentHashMap) MSet(data map[string]interface{}) {
	for key, value := range data {
		shard := m.GetShard(key)
		shard.Lock()
		shard.items[key] = value
		shard.Unlock()
	}
}
func (m ConcurrentHashMap) Set(key string, value interface{}) {
	shard := m.GetShard(key)
	shard.Lock()
	shard.items[key] = value
	shard.Unlock()
}
type UpsertCb func(exist bool, valueInMap interface{}, newValue interface{}) interface{}
func (m ConcurrentHashMap) Upsert(key string, value interface{}, cb UpsertCb) (res interface{}) {
	shard := m.GetShard(key)
	shard.Lock()
	v, ok := shard.items[key]
	res = cb(ok, v, value)
	shard.items[key] = res
	shard.Unlock()
	return res
}
func (m ConcurrentHashMap) SetIfAbsent(key string, value interface{}) bool {
	shard := m.GetShard(key)
	shard.Lock()
	_, ok := shard.items[key]
	if !ok {
		shard.items[key] = value
	}
	shard.Unlock()
	return !ok
}
func (m ConcurrentHashMap) Get(key string) (interface{}, bool) {
	shard := m.GetShard(key)
	shard.RLock()
	val, ok := shard.items[key]
	shard.RUnlock()
	return val, ok
}
func (m ConcurrentHashMap) Count() uint64 {
	return m.NowKeyNumber
}
func (m ConcurrentHashMap) Has(key string) bool {
	shard := m.GetShard(key)
	shard.RLock()
	_, ok := shard.items[key]
	shard.RUnlock()
	return ok
}
func (m ConcurrentHashMap) Remove(key string) {
	shard := m.GetShard(key)
	shard.Lock()
	delete(shard.items, key)
	shard.Unlock()
}