mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Remove VM lock for sym_find
This commit is contained in:
parent
2235fdb6f1
commit
42f95456cc
1 changed files with 4 additions and 6 deletions
10
symbol.c
10
symbol.c
|
@ -827,12 +827,10 @@ sym_find(VALUE str)
|
||||||
{
|
{
|
||||||
VALUE sym;
|
VALUE sym;
|
||||||
|
|
||||||
GLOBAL_SYMBOLS_LOCKING(symbols) {
|
struct sym_set_static_sym_entry static_sym = {
|
||||||
struct sym_set_static_sym_entry static_sym = {
|
.str = str
|
||||||
.str = str
|
};
|
||||||
};
|
sym = rb_concurrent_set_find(&ruby_global_symbols.sym_set, sym_set_static_sym_tag(&static_sym));
|
||||||
sym = rb_concurrent_set_find(&symbols->sym_set, sym_set_static_sym_tag(&static_sym));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sym) {
|
if (sym) {
|
||||||
return sym_set_entry_to_sym(sym);
|
return sym_set_entry_to_sym(sym);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue