* thread.c (thread_start_func_2): do not delete main thread from
living_threads. [ruby-core:19385], [ruby-core:22158] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
58323cdc6e
commit
28ec52c087
@ -1,3 +1,8 @@
|
|||||||
|
Wed Feb 18 10:29:12 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* thread.c (thread_start_func_2): do not delete main thread from
|
||||||
|
living_threads. [ruby-core:19385], [ruby-core:22158]
|
||||||
|
|
||||||
Wed Feb 18 01:05:05 2009 Tanaka Akira <akr@fsij.org>
|
Wed Feb 18 01:05:05 2009 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* ext/openssl: avoid cyclic require.
|
* ext/openssl: avoid cyclic require.
|
||||||
|
14
thread.c
14
thread.c
@ -440,8 +440,10 @@ thread_start_func_2(rb_thread_t *th, VALUE *stack_start, VALUE *register_stack_s
|
|||||||
th->keeping_mutexes = NULL;
|
th->keeping_mutexes = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* delete self from living_threads */
|
/* delete self other than main thread from living_threads */
|
||||||
st_delete_wrap(th->vm->living_threads, th->self);
|
if (th != main_th) {
|
||||||
|
st_delete_wrap(th->vm->living_threads, th->self);
|
||||||
|
}
|
||||||
|
|
||||||
/* wake up joinning threads */
|
/* wake up joinning threads */
|
||||||
join_th = th->join_list_head;
|
join_th = th->join_list_head;
|
||||||
@ -1026,7 +1028,7 @@ rb_thread_blocking_region_end(struct rb_blocking_region_buffer *region)
|
|||||||
*
|
*
|
||||||
* Safe C API:
|
* Safe C API:
|
||||||
* * rb_thread_interrupted() - check interrupt flag
|
* * 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.
|
* if they called without GVL, acquire GVL automatically.
|
||||||
*/
|
*/
|
||||||
VALUE
|
VALUE
|
||||||
@ -2132,7 +2134,7 @@ rb_thread_priority_set(VALUE thread, VALUE prio)
|
|||||||
* - OpenBSD 2.0 (src/sys/kern/sys_generic.c:1.4)
|
* - OpenBSD 2.0 (src/sys/kern/sys_generic.c:1.4)
|
||||||
* select(2) documents how to allocate fd_set dynamically.
|
* select(2) documents how to allocate fd_set dynamically.
|
||||||
* http://www.openbsd.org/cgi-bin/man.cgi?query=select&manpath=OpenBSD+4.4
|
* 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
|
* http://docs.hp.com/en/B2355-60105/select.2.html
|
||||||
* - Solaris 8 has select_large_fdset
|
* - Solaris 8 has select_large_fdset
|
||||||
*
|
*
|
||||||
@ -2718,7 +2720,7 @@ thgroup_list(VALUE group)
|
|||||||
{
|
{
|
||||||
VALUE ary = rb_ary_new();
|
VALUE ary = rb_ary_new();
|
||||||
struct thgroup_list_params param;
|
struct thgroup_list_params param;
|
||||||
|
|
||||||
param.ary = ary;
|
param.ary = ary;
|
||||||
param.group = group;
|
param.group = group;
|
||||||
st_foreach(GET_THREAD()->vm->living_threads, thgroup_list_i, (st_data_t) & param);
|
st_foreach(GET_THREAD()->vm->living_threads, thgroup_list_i, (st_data_t) & param);
|
||||||
@ -3671,7 +3673,7 @@ static void
|
|||||||
call_trace_func(rb_event_flag_t event, VALUE proc, VALUE self, ID id, VALUE klass)
|
call_trace_func(rb_event_flag_t event, VALUE proc, VALUE self, ID id, VALUE klass)
|
||||||
{
|
{
|
||||||
struct call_trace_func_args args;
|
struct call_trace_func_args args;
|
||||||
|
|
||||||
args.event = event;
|
args.event = event;
|
||||||
args.proc = proc;
|
args.proc = proc;
|
||||||
args.self = self;
|
args.self = self;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user