* fix #13496 handle tombstones * add test * more tests * fix #13504; add SharedTable tests * fix #https://github.com/nim-lang/Nim/issues/13505 intsets.missingOrExcl silently gave wrong results sometimes * add test for tintsets
This commit is contained in:
parent
9a93f73983
commit
42dad3a836
9 changed files with 296 additions and 41 deletions
|
|
@ -206,6 +206,11 @@ proc del*[A, B](t: var SharedTable[A, B], key: A) =
|
|||
withLock t:
|
||||
delImpl()
|
||||
|
||||
proc len*[A, B](t: var SharedTable[A, B]): int =
|
||||
## number of elements in `t`
|
||||
withLock t:
|
||||
result = t.counter
|
||||
|
||||
proc init*[A, B](t: var SharedTable[A, B], initialSize = 64) =
|
||||
## creates a new hash table that is empty.
|
||||
##
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue