ruby-changes:10960
From: yugui <ko1@a...>
Date: Sun, 22 Feb 2009 21:50:05 +0900 (JST)
Subject: [ruby-changes:10960] Ruby:r22537 (ruby_1_9_1): merges r22389 from trunk into ruby_1_9_1.
yugui 2009-02-22 21:49:53 +0900 (Sun, 22 Feb 2009) New Revision: 22537 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=22537 Log: merges r22389 from trunk into ruby_1_9_1. * thread.c (thread_start_func_2): do not delete main thread from living_threads. [ruby-core:19385], [ruby-core:22158] Modified files: branches/ruby_1_9_1/ChangeLog branches/ruby_1_9_1/thread.c Index: ruby_1_9_1/ChangeLog =================================================================== --- ruby_1_9_1/ChangeLog (revision 22536) +++ ruby_1_9_1/ChangeLog (revision 22537) @@ -1,3 +1,8 @@ +Wed Feb 18 10:29:12 2009 Nobuyoshi Nakada <nobu@r...> + + * thread.c (thread_start_func_2): do not delete main thread from + living_threads. [ruby-core:19385], [ruby-core:22158] + Tue Feb 17 05:41:08 2009 Koichi Sasada <ko1@a...> * compile.c: fix to add "ensure" codes across "while" clause Index: ruby_1_9_1/thread.c =================================================================== --- ruby_1_9_1/thread.c (revision 22536) +++ ruby_1_9_1/thread.c (revision 22537) @@ -440,8 +440,10 @@ th->keeping_mutexes = NULL; } - /* delete self from living_threads */ - st_delete_wrap(th->vm->living_threads, th->self); + /* delete self other than main thread from living_threads */ + if (th != main_th) { + st_delete_wrap(th->vm->living_threads, th->self); + } /* wake up joinning threads */ join_th = th->join_list_head; @@ -1026,7 +1028,7 @@ * * Safe C API: * * rb_thread_interrupted() - check interrupt flag - * * ruby_xalloc(), ruby_xrealloc(), ruby_xfree() - + * * ruby_xalloc(), ruby_xrealloc(), ruby_xfree() - * if they called without GVL, acquire GVL automatically. */ VALUE @@ -2132,7 +2134,7 @@ * - OpenBSD 2.0 (src/sys/kern/sys_generic.c:1.4) * select(2) documents how to allocate fd_set dynamically. * http://www.openbsd.org/cgi-bin/man.cgi?query=select&manpath=OpenBSD+4.4 - * - HP-UX documents how to allocate fd_set dynamically. + * - HP-UX documents how to allocate fd_set dynamically. * http://docs.hp.com/en/B2355-60105/select.2.html * - Solaris 8 has select_large_fdset * @@ -2718,7 +2720,7 @@ { VALUE ary = rb_ary_new(); struct thgroup_list_params param; - + param.ary = ary; param.group = group; st_foreach(GET_THREAD()->vm->living_threads, thgroup_list_i, (st_data_t) & param); @@ -3638,7 +3640,7 @@ call_trace_func(rb_event_flag_t event, VALUE proc, VALUE self, ID id, VALUE klass) { struct call_trace_func_args args; - + args.event = event; args.proc = proc; args.self = self; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/