Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use main_thread->ec from rb_vm_main_ractor_ec #9311

Merged
merged 2 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ changelog for details of the default gems or bundled gems.
* added: `rb_postponed_job_preregister()`
* added: `rb_postponed_job_trigger()`
* deprecated: `rb_postponed_job_register()` (and semantic change. see below)
* deprecated: `rb_postponed_job_register_once()`
* deprecated: `rb_postponed_job_register_one()`
* The postponed job APIs have been changed to address some rare crashes.
To solve the issue, we introduced new two APIs and deprecated current APIs.
The semantics of these functions have also changed slightly; `rb_postponed_job_register`
Expand Down
4 changes: 2 additions & 2 deletions include/ruby/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -643,11 +643,11 @@ VALUE rb_tracearg_object(rb_trace_arg_t *trace_arg);
* racing with Ruby's internal use of them. These two functions are still present,
* but are marked as deprecated and have slightly changed semantics:
*
* * rb_postponed_job_register now works like rb_postponed_job_register_once i.e.
* * rb_postponed_job_register now works like rb_postponed_job_register_one i.e.
* `func` will only be executed at most one time each time Ruby checks for
* interrupts, no matter how many times it is registered
* * They are also called with the last `data` to be registered, not the first
* (which is how rb_postponed_job_register_once previously worked)
* (which is how rb_postponed_job_register_one previously worked)
*/


Expand Down
2 changes: 1 addition & 1 deletion ractor.c
Original file line number Diff line number Diff line change
Expand Up @@ -2481,7 +2481,7 @@ rb_ractor_terminate_all(void)
rb_execution_context_t *
rb_vm_main_ractor_ec(rb_vm_t *vm)
{
return vm->ractor.main_ractor->threads.running_ec;
return vm->ractor.main_thread->ec;
}

static VALUE
Expand Down