From 489e31b07a7171b4e4beb3471569812f91f26af4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Sun, 24 Dec 2023 22:51:41 +0800 Subject: [PATCH] update lock && normal --- common.go | 4 +++- normal.go | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/common.go b/common.go index a1c49a9..eb251f0 100644 --- a/common.go +++ b/common.go @@ -35,7 +35,9 @@ type common struct { // // Date : 21:25 2023/12/24 func (c *common) initLock() { - c.lock = &sync.RWMutex{} + if c.dataTableType == normalDataTableType { + c.lock = &sync.RWMutex{} + } } // Lock ... diff --git a/normal.go b/normal.go index 7dbd61f..9988843 100644 --- a/normal.go +++ b/normal.go @@ -12,7 +12,7 @@ package easymap // Author : go_developer@163.com<白茶清欢> // // Date : 10:07 下午 2021/2/23 -func NewNormal(withLock bool) EasyMap { - em, _ := NewSegment(1, withLock) +func NewNormal() EasyMap { + em, _ := NewSegment(1) return em }