Commit bfe6068
Use atomic for method reference count [Bug #20934]
This changes reference_count on rb_method_definition_struct into an
atomic.
Ractors can create additional references as part of `bind_call` or
(presumably) similar. Because this can be done inside Ractors, we should
use a lock or atomics so that we don't race and avoid incrementing.
Co-authored-by: wanabe <[email protected]>1 parent 62cc346 commit bfe6068
3 files changed
+29
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1937 | 1937 | | |
1938 | 1938 | | |
1939 | 1939 | | |
| 1940 | + | |
| 1941 | + | |
| 1942 | + | |
| 1943 | + | |
| 1944 | + | |
| 1945 | + | |
| 1946 | + | |
| 1947 | + | |
| 1948 | + | |
| 1949 | + | |
| 1950 | + | |
| 1951 | + | |
| 1952 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
181 | 182 | | |
182 | 183 | | |
183 | 184 | | |
184 | | - | |
| 185 | + | |
| 186 | + | |
185 | 187 | | |
186 | 188 | | |
187 | 189 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
511 | 511 | | |
512 | 512 | | |
513 | 513 | | |
514 | | - | |
515 | | - | |
| 514 | + | |
516 | 515 | | |
517 | | - | |
| 516 | + | |
518 | 517 | | |
519 | | - | |
520 | | - | |
521 | | - | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
522 | 521 | | |
523 | 522 | | |
524 | 523 | | |
525 | 524 | | |
526 | 525 | | |
527 | 526 | | |
528 | 527 | | |
529 | | - | |
| 528 | + | |
530 | 529 | | |
531 | 530 | | |
532 | 531 | | |
| |||
614 | 613 | | |
615 | 614 | | |
616 | 615 | | |
617 | | - | |
618 | | - | |
619 | | - | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
620 | 623 | | |
621 | 624 | | |
622 | 625 | | |
| |||
0 commit comments