mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
refactoring r63073.
* cont.c (root_fiber_alloc): call `ConvertThreadToFiber()` here. `rb_fiber_t` for root_fiber is allocated before running Threads. Fiber objects wrapping this rb_fiber_t for root_fiber are created when root Fiber object is required explicitly (for example, Fiber switching and so on). We can put calling `ConvertThreadToFiber()`. In other words, we can pending `ConvertThreadToFiber()` until Fiber objects are created. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
746a88e199
commit
51d227e3a5
3 changed files with 13 additions and 34 deletions
2
thread.c
2
thread.c
|
@ -643,7 +643,6 @@ thread_do_start(rb_thread_t *th, VALUE args)
|
|||
}
|
||||
|
||||
void rb_ec_clear_current_thread_trace_func(const rb_execution_context_t *ec);
|
||||
void rb_threadptr_root_fiber_setup_by_child(rb_thread_t *th);
|
||||
|
||||
static int
|
||||
thread_start_func_2(rb_thread_t *th, VALUE *stack_start, VALUE *register_stack_start)
|
||||
|
@ -663,7 +662,6 @@ thread_start_func_2(rb_thread_t *th, VALUE *stack_start, VALUE *register_stack_s
|
|||
rb_bug("thread_start_func_2 must not be used for main thread");
|
||||
|
||||
ruby_thread_set_native(th);
|
||||
rb_threadptr_root_fiber_setup_by_child(th);
|
||||
|
||||
th->ec->machine.stack_start = stack_start;
|
||||
#ifdef __ia64
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue