mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
merge revision(s) 34629,34630:
* cont.c (rb_fiber_reset_root_local_storage): add a new function to restore rb_thread_t::local_storage. * cont.c (rb_obj_is_fiber): add a new function to tell finalizer to prevent fibers from destroy. * gc.c (rb_objspace_call_finalizer): don't sweep fibers at finalizing objspace. * internal.h (rb_fiber_reset_root_local_storage, rb_obj_is_fiber): add prototypes. * vm.c (ruby_vm_destruct): reset main thread's local_storage before free main thread. rb_thread_t::local_storage is replaced by fiber's local storage when forked from fiber, and it should be already freed when the fiber was destroyed. * test/ruby/test_fiber.rb (test_fork_from_fiber): add test for fork from fiber. when the fiber was destroyed. [ruby-core:41456] [Bug #5700] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a4debd6ae2
commit
8cdf5c4179
7 changed files with 70 additions and 2 deletions
|
@ -61,6 +61,10 @@ int rb_parse_in_eval(void);
|
|||
int rb_parse_in_main(void);
|
||||
VALUE rb_insns_name_array(void);
|
||||
|
||||
/* cont.c */
|
||||
VALUE rb_obj_is_fiber(VALUE);
|
||||
void rb_fiber_reset_root_local_storage(VALUE);
|
||||
|
||||
/* debug.c */
|
||||
PRINTF_ARGS(void ruby_debug_printf(const char*, ...), 1, 2);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue