summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authorJohn Hawthorn <john@hawthorn.email>2025-12-17 12:12:17 -0800
committerJohn Hawthorn <john@hawthorn.email>2025-12-18 13:43:45 -0800
commit63b082cf0e87942dcea28cbdeb1c8a9e616e903a (patch)
tree60a6d248f1874b4f2d211571dfa7caa29c60fd35 /thread.c
parentaace29d485559e38ca06923a6af335dbb5fb28f1 (diff)
Store ractor_id directly on EC
This is easier to access as ec->ractor_id instead of pointer-chasing through ec->thread->ractor->ractor_id Co-authored-by: Luke Gruber <luke.gru@gmail.com>
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/thread.c b/thread.c
index 3e1bb1dbe7..788a0e9ad7 100644
--- a/thread.c
+++ b/thread.c
@@ -860,6 +860,7 @@ thread_create_core(VALUE thval, struct thread_create_params *params)
#endif
th->invoke_type = thread_invoke_type_ractor_proc;
th->ractor = params->g;
+ th->ec->ractor_id = rb_ractor_id(th->ractor);
th->ractor->threads.main = th;
th->invoke_arg.proc.proc = rb_proc_isolate_bang(params->proc, Qnil);
th->invoke_arg.proc.args = INT2FIX(RARRAY_LENINT(params->args));