Skip to content

Commit 7e57588

Browse files
committed
merge revision(s) 18316,18319:
* rubysig.h (CHECK_INTS): gives the chance to perform to deferred finalizers before explicit GC.start or the process termination. [ruby-core:18045] * eval.c (rb_thread_schedule): runs deferred finalizers. * gc.c (gc_sweep): sets rb_thread_pending to run deferred finalizers. * rubysig.h (CHECK_INTS): now checks rb_thread_pending even on platforms where setitimer is not available. [ruby-core:18045] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@21334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 15f2a7e commit 7e57588

File tree

5 files changed

+25
-8
lines changed

5 files changed

+25
-8
lines changed

ChangeLog

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
Mon Jan 5 11:14:39 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
2+
3+
* eval.c (rb_thread_schedule): runs deferred finalizers.
4+
5+
* gc.c (gc_sweep): sets rb_thread_pending to run deferred finalizers.
6+
7+
* rubysig.h (CHECK_INTS): now checks rb_thread_pending even on
8+
platforms where setitimer is not available. [ruby-core:18045]
9+
10+
Mon Jan 5 11:14:39 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
11+
12+
* rubysig.h (CHECK_INTS): gives the chance to perform to deferred
13+
finalizers before explicit GC.start or the process termination.
14+
[ruby-core:18045]
15+
116
Sun Jan 4 04:49:01 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
217

318
* win32/win32.c (rb_w32_telldir): just returns loc.

eval.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10948,6 +10948,7 @@ rb_thread_schedule()
1094810948
}
1094910949
#endif
1095010950
rb_thread_pending = 0;
10951+
rb_gc_finalize_deferred();
1095110952
if (curr_thread == curr_thread->next
1095210953
&& curr_thread->status == THREAD_RUNNABLE)
1095310954
return;

gc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,6 +1187,7 @@ gc_sweep()
11871187
/* clear finalization list */
11881188
if (final_list) {
11891189
deferred_final_list = final_list;
1190+
rb_thread_pending = 1;
11901191
return;
11911192
}
11921193
free_unused_heaps();

rubysig.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ RUBY_EXTERN rb_atomic_t rb_trap_pending;
7878
void rb_trap_restore_mask _((void));
7979

8080
RUBY_EXTERN int rb_thread_critical;
81+
RUBY_EXTERN int rb_thread_pending;
8182
void rb_thread_schedule _((void));
8283
#if defined(HAVE_SETITIMER) || defined(_THREAD_SAFE)
83-
RUBY_EXTERN int rb_thread_pending;
8484
# define CHECK_INTS do {\
8585
if (!(rb_prohibit_interrupt || rb_thread_critical)) {\
86-
if (rb_thread_pending) rb_thread_schedule();\
86+
if (rb_thread_pending) rb_thread_schedule();\
8787
if (rb_trap_pending) rb_trap_exec();\
8888
}\
8989
} while (0)
@@ -93,9 +93,9 @@ RUBY_EXTERN int rb_thread_tick;
9393
#define THREAD_TICK 500
9494
#define CHECK_INTS do {\
9595
if (!(rb_prohibit_interrupt || rb_thread_critical)) {\
96-
if (rb_thread_tick-- <= 0) {\
96+
if (rb_thread_pending || rb_thread_tick-- <= 0) {\
9797
rb_thread_tick = THREAD_TICK;\
98-
rb_thread_schedule();\
98+
rb_thread_schedule();\
9999
}\
100100
}\
101101
if (rb_trap_pending) rb_trap_exec();\

version.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
#define RUBY_VERSION "1.8.7"
2-
#define RUBY_RELEASE_DATE "2009-01-04"
2+
#define RUBY_RELEASE_DATE "2009-01-05"
33
#define RUBY_VERSION_CODE 187
4-
#define RUBY_RELEASE_CODE 20090104
5-
#define RUBY_PATCHLEVEL 76
4+
#define RUBY_RELEASE_CODE 20090105
5+
#define RUBY_PATCHLEVEL 77
66

77
#define RUBY_VERSION_MAJOR 1
88
#define RUBY_VERSION_MINOR 8
99
#define RUBY_VERSION_TEENY 7
1010
#define RUBY_RELEASE_YEAR 2009
1111
#define RUBY_RELEASE_MONTH 1
12-
#define RUBY_RELEASE_DAY 4
12+
#define RUBY_RELEASE_DAY 5
1313

1414
#ifdef RUBY_EXTERN
1515
RUBY_EXTERN const char ruby_version[];

0 commit comments

Comments
 (0)