Closed sunxiao2010n closed 7 years ago
In file cache.go
if !ok { t = &CacheTable{ name: table, items: make(map[interface{}]*CacheItem), } mutex.Lock() cache[table] = t mutex.Unlock() } return t
if !ok { t = &CacheTable{ name: table, items: make(map[interface{}]*CacheItem), }
mutex.Lock() cache[table] = t mutex.Unlock()
}
return t
the assigment function of cache item is
t = &CacheTable{ ... }
The "t = &CacheTable" seems to be stored at stack , and can not be reentrant after function returns. How could I understand this ? Thanks.
t = &CacheTable means t = new CacheTable
In file cache.go
the assigment function of cache item is
The "t = &CacheTable" seems to be stored at stack , and can not be reentrant after function returns. How could I understand this ? Thanks.