Peter Zhu
9ef482bd13
Add rb_concurrent_set_size
2025-07-21 10:58:30 -04:00
Peter Zhu
5d44f2917f
Skip garbage check for special consts in concurrent set
...
rb_objspace_garbage_object_p expects only GC managed objects to be passed
in. We should skip the check if curr_key is a special constant.
2025-07-21 10:58:30 -04:00
Peter Zhu
dafc4e131e
Fix size assertion in concurrent set resizing
...
Since we resize when `prev_size > set->capacity / 2`, it's possible that
`prev_size == set->capacity / 2`, so we need to change the assertion in
concurrent_set_try_resize_without_locking to be
`new_set->size <= new_set->capacity / 2`.
2025-07-18 10:01:06 -04:00
Peter Zhu
f5312d8e7f
Make rb_concurrent_set_funcs const
...
We should never modify rb_concurrent_set_funcs during runtime, so we can
make it const.
2025-07-15 09:55:36 -04:00
Jean Boussier
0bb44f291e
Rename ractor_safe_set
into concurrent_set
...
There's nothing ractor related in them, and the classic terminology
for these sort of data structures is `concurrent-*`, e.g.
concurrent hash.
2025-07-07 15:12:39 +02:00