summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-10 14:54:50 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-10 14:54:50 +0000
commit9242da9e02fb7b37e20d6178ba6c9658d6bf8f31 (patch)
treeb61cf7b45e601b9d0d891cf292c1186255f814e3 /thread.c
parent3660ca5281a0dd77a01d75b7967387ae756aacde (diff)
* thread.c (thread_create_core): inherit the priority of creating
thread. submitted at [ruby-core:11873] by David Flanagan <david AT davidflanagan.com>. [ruby-core:11876] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/thread.c b/thread.c
index f5c2773599..301d67137a 100644
--- a/thread.c
+++ b/thread.c
@@ -367,6 +367,8 @@ thread_create_core(VALUE klass, VALUE args, VALUE (*fn)(ANYARGS), void *arg)
th->first_func = fn;
th->first_func_arg = arg;
+ th->priority = GET_THREAD()->priority;
+
native_mutex_initialize(&th->interrupt_lock);
/* kick thread */
st_insert(th->vm->living_threads, thval, (st_data_t) th->thread_id);