Skip to content

Commit 0f40860

Browse files
wkspeterzhu2118
authored andcommitted
Fix missing increment of deleted_entries
When `rb_concurrent_set_foreach_with_replace` deletes entries from a concurrent set, it should increment the `deleted_entries` field, too.
1 parent 8541dec commit 0f40860

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

concurrent_set.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,7 @@ rb_concurrent_set_foreach_with_replace(VALUE set_obj, int (*callback)(VALUE *key
402402
return;
403403
case ST_DELETE:
404404
set->entries[i].key = CONCURRENT_SET_DELETED;
405+
set->deleted_entries++;
405406
break;
406407
}
407408
break;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy