mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Introduce Fiber#storage
for inheritable fiber-scoped variables. (#6612)
This commit is contained in:
parent
9869bd1d61
commit
0436f1e15a
Notes:
git
2022-12-01 10:00:52 +00:00
Merged-By: ioquatix <samuel@codeotaku.com>
10 changed files with 442 additions and 56 deletions
2
thread.c
2
thread.c
|
@ -813,6 +813,8 @@ thread_create_core(VALUE thval, struct thread_create_params *params)
|
|||
"can't start a new thread (frozen ThreadGroup)");
|
||||
}
|
||||
|
||||
rb_fiber_inherit_storage(ec, th->ec->fiber_ptr);
|
||||
|
||||
switch (params->type) {
|
||||
case thread_invoke_type_proc:
|
||||
th->invoke_type = thread_invoke_type_proc;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue