This commit is contained in:
xing 2023-10-23 22:47:21 +08:00
parent 3fd4f412b1
commit 48a3fe6588

View File

@ -37,7 +37,7 @@ var safetyMapLock = sync.Mutex{}
var flushMapFn = safety.NewMap[string, func(any)]() var flushMapFn = safety.NewMap[string, func(any)]()
func FlushMapVal(namespace string, key any) { func FlushMapVal[T any](namespace string, key T) {
fn, ok := flushMapFn.Load(namespace) fn, ok := flushMapFn.Load(namespace)
if !ok { if !ok {
return return