mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Add rb_concurrent_set_find
This commit is contained in:
parent
9ef482bd13
commit
f05ee26a1f
2 changed files with 57 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
#ifndef RUBY_RACTOR_SAFE_TABLE_H
|
||||
#define RUBY_RACTOR_SAFE_TABLE_H
|
||||
|
||||
#include "ruby/atomic.h"
|
||||
#include "ruby/ruby.h"
|
||||
|
||||
typedef VALUE (*rb_concurrent_set_hash_func)(VALUE key);
|
||||
|
@ -15,6 +16,7 @@ struct rb_concurrent_set_funcs {
|
|||
|
||||
VALUE rb_concurrent_set_new(const struct rb_concurrent_set_funcs *funcs, int capacity);
|
||||
rb_atomic_t rb_concurrent_set_size(VALUE set_obj);
|
||||
VALUE rb_concurrent_set_find(VALUE *set_obj_ptr, VALUE key);
|
||||
VALUE rb_concurrent_set_find_or_insert(VALUE *set_obj_ptr, VALUE key, void *data);
|
||||
VALUE rb_concurrent_set_delete_by_identity(VALUE set_obj, VALUE key);
|
||||
void rb_concurrent_set_foreach_with_replace(VALUE set_obj, int (*callback)(VALUE *key, void *data), void *data);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue