improve the docs for tables.add
This commit is contained in:
parent
647c1a1268
commit
6f8e98cff2
2 changed files with 5 additions and 0 deletions
|
|
@ -183,6 +183,7 @@ proc `[]=`*[A, B](t: var SharedTable[A, B], key: A, val: B) =
|
|||
|
||||
proc add*[A, B](t: var SharedTable[A, B], key: A, val: B) =
|
||||
## puts a new (key, value)-pair into `t` even if ``t[key]`` already exists.
|
||||
## This can introduce duplicate keys into the table!
|
||||
withLock t:
|
||||
addImpl(enlarge)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue