summaryrefslogtreecommitdiffstats
path: root/thread_win32.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-12 04:57:39 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-12 04:57:39 +0000
commite407f42fb8e99b3e1f6b0f360452b3f8128ae976 (patch)
treefdfccacfb2d122fd9ac04b486aef61664555d7b3 /thread_win32.c
parentb996b6d08ec6c72a0c858a1a4ff4c8c0e531db0c (diff)
downloadruby-e407f42fb8e99b3e1f6b0f360452b3f8128ae976.tar.gz
ruby-e407f42fb8e99b3e1f6b0f360452b3f8128ae976.tar.xz
ruby-e407f42fb8e99b3e1f6b0f360452b3f8128ae976.zip
* thread.c (thread_create_core): moved failure handling from
native_thread_core(). git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_win32.c')
-rw-r--r--thread_win32.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/thread_win32.c b/thread_win32.c
index 139b94a94..2baa60642 100644
--- a/thread_win32.c
+++ b/thread_win32.c
@@ -479,8 +479,7 @@ native_thread_create(rb_thread_t *th)
th->thread_id = w32_create_thread(stack_size, thread_start_func_1, th);
if ((th->thread_id) == 0) {
- st_delete_wrap(th->vm->living_threads, th->self);
- rb_raise(rb_eThreadError, "can't create Thread (%d)", errno);
+ return errno ? errno : -1;
}
w32_resume_thread(th->thread_id);