improve the docs for tables.add

This commit is contained in:
Araq 2017-12-12 19:55:46 +01:00
commit 6f8e98cff2
2 changed files with 5 additions and 0 deletions

View file

@ -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)