mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Only clear Ractor cache in child
This avoids a race condition where we were clearing the cache from another ractor while it was in use. Oops! Fixes this failure http://ci.rvm.jp/results/master@oci-aarch64/5750416
This commit is contained in:
parent
87b621bd5b
commit
3306d7d2f9
Notes:
git
2025-05-09 23:16:07 +00:00
1 changed files with 3 additions and 1 deletions
|
@ -9218,7 +9218,9 @@ gc_malloc_allocations(VALUE self)
|
|||
|
||||
void rb_gc_impl_before_fork(void *objspace_ptr) { /* no-op */ }
|
||||
void rb_gc_impl_after_fork(void *objspace_ptr, rb_pid_t pid) {
|
||||
rb_gc_ractor_newobj_cache_foreach(gc_ractor_newobj_cache_clear, NULL);
|
||||
if (pid == 0) { /* child process */
|
||||
rb_gc_ractor_newobj_cache_foreach(gc_ractor_newobj_cache_clear, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
VALUE rb_ident_hash_new_with_size(st_index_t size);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue