diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-04-10 06:53:39 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-04-10 06:53:39 +0000 |
commit | f024801e1e1c5fe55bff16989026be0de6c91937 (patch) | |
tree | 37e2c1ab2fd866613fbca6c14b0ea814dbcb262d /thread_pthread.ci | |
parent | b3e38e1819234ef34294f98a3f41e66063e9d011 (diff) | |
download | ruby-f024801e1e1c5fe55bff16989026be0de6c91937.tar.gz |
* thread_pthread.ci (native_thread_create): initialize sleep_cond.
fixed: [ruby-dev:30675]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_pthread.ci')
-rw-r--r-- | thread_pthread.ci | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/thread_pthread.ci b/thread_pthread.ci index 595bb8e8fb..34bb5362b9 100644 --- a/thread_pthread.ci +++ b/thread_pthread.ci @@ -247,7 +247,10 @@ native_thread_create(rb_thread_t *th) thread_debug("create: %p (%d)", th, err); CHECK_ERR(pthread_attr_destroy(&attr)); - if (err != 0) { + if (!err) { + pthread_cond_init(&th->native_thread_data.sleep_cond, 0); + } + else { st_delete_wrap(th->vm->living_threads, th->self); th->status = THREAD_KILLED; rb_raise(rb_eThreadError, "can't create Thread (%d)", err); |