mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 04:55:21 +02:00
Lazy init thread local storage
This commit is contained in:
parent
642dbb962c
commit
cadfaacb25
Notes:
git
2019-09-23 02:15:08 +09:00
3 changed files with 25 additions and 8 deletions
2
vm.c
2
vm.c
|
@ -2727,7 +2727,6 @@ ruby_thread_init(VALUE self)
|
|||
|
||||
th->vm = vm;
|
||||
th_init(th, self);
|
||||
rb_ivar_set(self, rb_intern("locals"), rb_hash_new());
|
||||
|
||||
th->top_wrapper = 0;
|
||||
th->top_self = rb_vm_top_self();
|
||||
|
@ -3235,7 +3234,6 @@ Init_VM(void)
|
|||
|
||||
/* create main thread */
|
||||
th_self = th->self = TypedData_Wrap_Struct(rb_cThread, &thread_data_type, th);
|
||||
rb_iv_set(th_self, "locals", rb_hash_new());
|
||||
vm->main_thread = th;
|
||||
vm->running_thread = th;
|
||||
th->vm = vm;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue