MCPcopy Index your code
hub / github.com/aceld/zinx / notify

Struct notify

znotify/notify.go:20–22  ·  view source on GitHub ↗

ConnIDMap Establish a structure that maps user-defined IDs to connections Map will have concurrent access issues, as well as looping through large amounts of data Use the map structure of shard and lock storage to minimize lock granularity and lock holding time (建立一个用户自定义ID和连接映射的结构 map会存在并发问题,大量数据循环

Source from the content-addressed store, hash-verified

18// 使用分片加锁的map结构存储,尽量减少锁的粒度和锁的持有时间)
19
20type notify struct {
21 connIdMap zutils.ShardLockMaps
22}
23
24func NewZNotify() ziface.Inotify {
25 return &notify{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected