From c222de6d9908ce0004ea7b43d49f85938797e6da Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 9 Oct 2003 14:50:24 +0000 Subject: * eval.c (rb_thread_start_0): prevent thread from GC. [ruby-dev:21572] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- eval.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'eval.c') diff --git a/eval.c b/eval.c index 033134cb3..8fb1ac6a5 100644 --- a/eval.c +++ b/eval.c @@ -9385,6 +9385,7 @@ rb_thread_start_0(fn, arg, th) rb_thread_t th; { volatile rb_thread_t th_save = th; + volatile VALUE thread = th->thread; struct BLOCK *volatile saved_block = 0, *block; enum thread_status status; int state; @@ -9408,7 +9409,7 @@ rb_thread_start_0(fn, arg, th) #endif if (THREAD_SAVE_CONTEXT(curr_thread)) { - return th_save->thread; + return thread; } if (ruby_block) { /* should nail down higher blocks */ -- cgit