1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-07 06:02:27 +08:00

doc: update copyonwritelist doc

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

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.
## 源码

View File

@@ -1,8 +1,6 @@
# CopyOnWriteList
CopyOnWriteList 是一个线程安全的 List 实现,底层使用 go 切片
.在写入时,会复制一份新的切片,写入完成后,再将新的切片赋值给原来的切片.
在读取时,直接读取原来的切片
CopyOnWriteList 是一个线程安全的 List 实现,底层使用 go 切片。写入时,会复制一份新的切片,写入完成后,再将新的切片赋值给原来的切片。读取时,直接读取原来的切片。
## 源码