mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* vm.c (thread_free): reset ruby_current_thread if it points the
thread to free. * gc.c (slot_sweep): don't call RUBY_VM_SET_FINALIZER_INTERRUPT if there is no current thread. [ruby-dev:43000] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e1680f8cc1
commit
fd2f238560
3 changed files with 14 additions and 1 deletions
|
@ -1,3 +1,11 @@
|
|||
Wed Jan 12 19:28:23 2011 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* vm.c (thread_free): reset ruby_current_thread if it points the
|
||||
thread to free.
|
||||
* gc.c (slot_sweep): don't call RUBY_VM_SET_FINALIZER_INTERRUPT if
|
||||
there is no current thread.
|
||||
[ruby-dev:43000]
|
||||
|
||||
Wed Jan 12 19:09:29 2011 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* enum.c (sort_by_i): reenter check more strictly.
|
||||
|
|
5
gc.c
5
gc.c
|
@ -1958,7 +1958,10 @@ slot_sweep(rb_objspace_t *objspace, struct heaps_slot *sweep_slot)
|
|||
objspace->heap.final_num += final_num;
|
||||
|
||||
if (deferred_final_list) {
|
||||
RUBY_VM_SET_FINALIZER_INTERRUPT(GET_THREAD());
|
||||
rb_thread_t *th = GET_THREAD();
|
||||
if (th) {
|
||||
RUBY_VM_SET_FINALIZER_INTERRUPT(th);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
2
vm.c
2
vm.c
|
@ -1730,6 +1730,8 @@ thread_free(void *ptr)
|
|||
#endif
|
||||
ruby_xfree(ptr);
|
||||
}
|
||||
if (ruby_current_thread == th)
|
||||
ruby_current_thread = NULL;
|
||||
}
|
||||
RUBY_FREE_LEAVE("thread");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue