doc: update copyonwritelist doc

This commit is contained in:
dudaodong committed 2023-08-22 10:26:39 +08:00
1 parent 1a7e0e8792
commit 27777eecc0
2 files changed
+2 -5

No files matched your search

+1 -2
View File
@@ -1,7 +1,6 @@
# CopyOnWriteList
CopyOnWriteList is a thread-safe list implementation that uses go slicing as its base.
. When writing, a new slice is copied and assigned to the original slice when writing is complete.When reading, the original slice is read directly.
CopyOnWriteList is a thread-safe list implementation that uses go slicing as its base. When writing, a new slice is copied and assigned to the original slice when writing is complete. When reading, the original slice is read directly.
## 源码
+1 -3
View File
@@ -1,8 +1,6 @@
# CopyOnWriteList
CopyOnWriteList 是一个线程安全的 List 实现,底层使用 go 切片
.在写入时,会复制一份新的切片,写入完成后,再将新的切片赋值给原来的切片.
在读取时,直接读取原来的切片
CopyOnWriteList 是一个线程安全的 List 实现,底层使用 go 切片。写入时,会复制一份新的切片,写入完成后,再将新的切片赋值给原来的切片。读取时,直接读取原来的切片。
## 源码