1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* thread.c (rb_threadptr_check_signal): remove unnecessary th->status

backup. fix race condition which may results unexpected main thread's
  status transition. see #4072

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nagachika 2011-06-25 14:21:16 +00:00
parent eae5081790
commit 1a196574c4
2 changed files with 7 additions and 4 deletions

View file

@ -1,3 +1,9 @@
Sat Jun 25 23:14:47 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
* thread.c (rb_threadptr_check_signal): remove unnecessary th->status
backup. fix race condition which may results unexpected main thread's
status transition. see #4072
Fri Jun 24 19:57:30 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
* lib/webrick/httprequest.rb (setup_forwarded_info): Parsing request

View file

@ -2953,13 +2953,10 @@ rb_threadptr_check_signal(rb_thread_t *mth)
/* mth must be main_thread */
if (!mth->exec_signal && (sig = rb_get_next_signal()) > 0) {
enum rb_thread_status prev_status = mth->status;
thread_debug("main_thread: %s, sig: %d\n",
thread_status_name(prev_status), sig);
thread_status_name(mth->status), sig);
mth->exec_signal = sig;
if (mth->status != THREAD_KILLED) mth->status = THREAD_RUNNABLE;
rb_threadptr_interrupt(mth);
mth->status = prev_status;
}
}