ruby-changes:6801
From: nobu <ko1@a...>
Date: Sat, 2 Aug 2008 11:52:00 +0900 (JST)
Subject: [ruby-changes:6801] Ruby:r18316 (ruby_1_8): * rubysig.h (CHECK_INTS): gives the chance to perform to deferred
nobu 2008-08-02 11:51:44 +0900 (Sat, 02 Aug 2008) New Revision: 18316 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=18316 Log: * rubysig.h (CHECK_INTS): gives the chance to perform to deferred finalizers before explicit GC.start or the process termination. [ruby-core:18045] Modified files: branches/ruby_1_8/ChangeLog branches/ruby_1_8/rubysig.h Index: ruby_1_8/ChangeLog =================================================================== --- ruby_1_8/ChangeLog (revision 18315) +++ ruby_1_8/ChangeLog (revision 18316) @@ -1,3 +1,9 @@ +Sat Aug 2 11:51:42 2008 Nobuyoshi Nakada <nobu@r...> + + * rubysig.h (CHECK_INTS): gives the chance to perform to deferred + finalizers before explicit GC.start or the process termination. + [ruby-core:18045] + Fri Aug 1 14:54:42 2008 Nobuyoshi Nakada <nobu@r...> * win32/win32.c (rb_w32_seekdir): no need to rewind to seek forward. Index: ruby_1_8/rubysig.h =================================================================== --- ruby_1_8/rubysig.h (revision 18315) +++ ruby_1_8/rubysig.h (revision 18316) @@ -79,11 +79,13 @@ RUBY_EXTERN int rb_thread_critical; void rb_thread_schedule _((void)); +void rb_gc_finalize_deferred _((void)); #if defined(HAVE_SETITIMER) || defined(_THREAD_SAFE) RUBY_EXTERN int rb_thread_pending; # define CHECK_INTS do {\ if (!(rb_prohibit_interrupt || rb_thread_critical)) {\ - if (rb_thread_pending) rb_thread_schedule();\ + rb_gc_finalize_deferred();\ + if (rb_thread_pending) rb_thread_schedule();\ if (rb_trap_pending) rb_trap_exec();\ }\ } while (0) @@ -93,9 +95,10 @@ #define THREAD_TICK 500 #define CHECK_INTS do {\ if (!(rb_prohibit_interrupt || rb_thread_critical)) {\ + rb_gc_finalize_deferred();\ if (rb_thread_tick-- <= 0) {\ rb_thread_tick = THREAD_TICK;\ - rb_thread_schedule();\ + rb_thread_schedule();\ }\ }\ if (rb_trap_pending) rb_trap_exec();\ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/