diff options
| author | Luke Gruber <luke.gruber@shopify.com> | 2025-07-03 17:43:37 -0400 |
|---|---|---|
| committer | Jean Boussier <jean.boussier@gmail.com> | 2025-07-21 15:57:44 +0200 |
| commit | be58cd4d7d8ec57f0a45ceb01dceded287237e08 (patch) | |
| tree | daf2074ae8f5ca0518e34ccf05a2e88155967a17 /include/ruby/fiber | |
| parent | c3d91eb4d924b7db1185f869184519362bfcce94 (diff) | |
Ractor: lock around global variable get/set
There's a global id_table `rb_global_tbl` that needs a lock (I used VM lock). In the future, we might use a lock-free rb_id_table if we create such a data structure.
Reproduction script that might crash or behave strangely:
```ruby
100.times do
Ractor.new do
1_000_000.times do
$stderr
$stdout
$stdin
$VERBOSE
$stderr
$stdout
$stdin
$VERBOSE
$stderr
$stdout
$stdin
$VERBOSE
end
end
end
$myglobal0 = nil;
$myglobal1 = nil;
# ... vim macros to the rescue
$myglobal100000 = nil;
```
Diffstat (limited to 'include/ruby/fiber')
0 files changed, 0 insertions, 0 deletions
