* thread.c (thread_create_core): don't use th->thread_id before
initialized. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b9163cc1fd
commit
82b33551a4
@ -1,3 +1,8 @@
|
|||||||
|
Sat Nov 24 10:59:14 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||||
|
|
||||||
|
* thread.c (thread_create_core): don't use th->thread_id before
|
||||||
|
initialized.
|
||||||
|
|
||||||
Sat Nov 24 00:00:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Sat Nov 24 00:00:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* ruby.c (proc_options, process_options, ruby_process_options): take
|
* ruby.c (proc_options, process_options, ruby_process_options): take
|
||||||
|
3
thread.c
3
thread.c
@ -570,13 +570,12 @@ thread_create_core(VALUE thval, VALUE args, VALUE (*fn)(ANYARGS))
|
|||||||
native_mutex_initialize(&th->interrupt_lock);
|
native_mutex_initialize(&th->interrupt_lock);
|
||||||
|
|
||||||
/* kick thread */
|
/* kick thread */
|
||||||
st_insert(th->vm->living_threads, thval, (st_data_t) th->thread_id);
|
|
||||||
err = native_thread_create(th);
|
err = native_thread_create(th);
|
||||||
if (err) {
|
if (err) {
|
||||||
st_delete_wrap(th->vm->living_threads, th->self);
|
|
||||||
th->status = THREAD_KILLED;
|
th->status = THREAD_KILLED;
|
||||||
rb_raise(rb_eThreadError, "can't create Thread (%d)", err);
|
rb_raise(rb_eThreadError, "can't create Thread (%d)", err);
|
||||||
}
|
}
|
||||||
|
st_insert(th->vm->living_threads, thval, (st_data_t) th->thread_id);
|
||||||
return thval;
|
return thval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user