Make waiting_fd behaviour per-IO. (#13127)

- `rb_thread_fd_close` is deprecated and now a no-op.
- IO operations (including close) no longer take a vm-wide lock.
This commit is contained in:
Samuel Williams 2025-05-13 19:02:03 +09:00 committed by GitHub
parent a6435befa7
commit 425fa0aeb5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
Notes: git 2025-05-13 10:02:17 +00:00
Merged-By: ioquatix <samuel@codeotaku.com>
14 changed files with 214 additions and 377 deletions

2
vm.c
View file

@ -3230,7 +3230,6 @@ ruby_vm_destruct(rb_vm_t *vm)
return 0;
}
size_t rb_vm_memsize_waiting_fds(struct ccan_list_head *waiting_fds); // thread.c
size_t rb_vm_memsize_workqueue(struct ccan_list_head *workqueue); // vm_trace.c
// Used for VM memsize reporting. Returns the size of the at_exit list by
@ -3285,7 +3284,6 @@ vm_memsize(const void *ptr)
return (
sizeof(rb_vm_t) +
rb_vm_memsize_waiting_fds(&vm->waiting_fds) +
rb_st_memsize(vm->loaded_features_index) +
rb_st_memsize(vm->loading_table) +
rb_vm_memsize_postponed_job_queue() +