diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-03-07 00:58:28 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-07 00:58:28 +0900 |
commit | b3c53a8a885be8f5cc2b712798b0d2741c488ce4 (patch) | |
tree | 4d0b0fad023a3867e1b8da884779cca6b57ed5b1 /ractor.c | |
parent | 8ccc12118ea5257f846476088eb9c64944560892 (diff) |
Make Ractor stdio belonging to the Ractor [Bug #17672]
Defer making ractor stdio until ractor started.
Before ractor started, created objects belong to the caller ractor
instead of the created ractor.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4241
Merged-By: nobu <nobu@ruby-lang.org>
Diffstat (limited to 'ractor.c')
-rw-r--r-- | ractor.c | 9 |
1 files changed, 0 insertions, 9 deletions
@@ -1583,11 +1583,6 @@ rb_ractor_main_setup(rb_vm_t *vm, rb_ractor_t *r, rb_thread_t *th) rb_ractor_living_threads_insert(r, th); } -// io.c -VALUE rb_io_prep_stdin(void); -VALUE rb_io_prep_stdout(void); -VALUE rb_io_prep_stderr(void); - static VALUE ractor_create(rb_execution_context_t *ec, VALUE self, VALUE loc, VALUE name, VALUE args, VALUE block) { @@ -1599,10 +1594,6 @@ ractor_create(rb_execution_context_t *ec, VALUE self, VALUE loc, VALUE name, VAL r->pub.id = ractor_next_id(); RUBY_DEBUG_LOG("r:%u", r->pub.id); - r->r_stdin = rb_io_prep_stdin(); - r->r_stdout = rb_io_prep_stdout(); - r->r_stderr = rb_io_prep_stderr(); - rb_ractor_t *cr = rb_ec_ractor_ptr(ec); r->verbose = cr->verbose; r->debug = cr->debug; |