package
Version:
v0.0.0-...-0012533
Opens a new window with list of versions in this module.
Published: Sep 11, 2023
License: MIT
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type SafeList struct {
C chan bool
}
SafeList 安全链表
func (sl *SafeList) Put(data interface{})
Put 放入
type SafeListNode struct {
}
SafeListNode 节点
type SafeMap struct {
sync.RWMutex
Map map[interface{}]interface{}
}
SafeMap 线程安全的map,使用读写锁保护,写时阻塞,读时共享
func (sm *SafeMap) Get(key interface{}) interface{}
Get 获取
func (sm *SafeMap) Remove(key interface{})
Remove 删除
func (sm *SafeMap) Set(key interface{}, value interface{})
Set 设置
func (sm *SafeMap) Travsal(cb func(interface{}, interface{}))
Travsal 遍历
Source Files
¶
Click to show internal directories.
Click to hide internal directories.