mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* rubysig.h (CHECK_INTS): gives the chance to perform to deferred
finalizers before explicit GC.start or the process termination. [ruby-core:18045] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@18316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1ebc425e1c
commit
8147ccea45
2 changed files with 11 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
Sat Aug 2 11:51:42 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* 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@ruby-lang.org>
|
||||
|
||||
* win32/win32.c (rb_w32_seekdir): no need to rewind to seek forward.
|
||||
|
|
|
@ -79,11 +79,13 @@ void rb_trap_restore_mask _((void));
|
|||
|
||||
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 @@ RUBY_EXTERN int rb_thread_tick;
|
|||
#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();\
|
||||
|
|
Loading…
Add table
Reference in a new issue