mirror of
https://github.com/ruby/ruby.git
synced 2025-09-17 09:33:59 +02:00
merge revision(s) 57595: [Backport #8996]
check thread deadness correctly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
da0e21528b
commit
f60e5af02d
3 changed files with 18 additions and 1 deletions
7
thread.c
7
thread.c
|
@ -2063,6 +2063,13 @@ rb_threadptr_raise(rb_thread_t *th, int argc, VALUE *argv)
|
|||
else {
|
||||
exc = rb_make_exception(argc, argv);
|
||||
}
|
||||
|
||||
/* making an exception object can switch thread,
|
||||
so we need to check thread deadness again */
|
||||
if (rb_threadptr_dead(th)) {
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
rb_threadptr_setup_exception(GET_THREAD(), exc, Qundef);
|
||||
rb_threadptr_pending_interrupt_enque(th, exc);
|
||||
rb_threadptr_interrupt(th);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue