зеркало из https://github.com/github/ruby.git
* thread.c (thread_raise_m): check interrupts after Thread#raise
if a target thread is the current thread because the behavior of Thread.current.raise is expected to perform same as Kernel.raise (by rubyspec). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
357a5f5ab5
Коммит
479d8ce5b5
|
@ -1,3 +1,10 @@
|
|||
Tue Oct 23 22:34:49 2012 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* thread.c (thread_raise_m): check interrupts after Thread#raise
|
||||
if a target thread is the current thread because the behavior
|
||||
of Thread.current.raise is expected to perform same as
|
||||
Kernel.raise (by rubyspec).
|
||||
|
||||
Tue Oct 23 17:08:39 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ruby.c (usage, process_options): show more info in --help.
|
||||
|
|
12
thread.c
12
thread.c
|
@ -1894,9 +1894,15 @@ rb_thread_fd_close(int fd)
|
|||
static VALUE
|
||||
thread_raise_m(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
rb_thread_t *th;
|
||||
GetThreadPtr(self, th);
|
||||
rb_threadptr_raise(th, argc, argv);
|
||||
rb_thread_t *target_th;
|
||||
rb_thread_t *th = GET_THREAD();
|
||||
GetThreadPtr(self, target_th);
|
||||
rb_threadptr_raise(target_th, argc, argv);
|
||||
|
||||
/* To perform Thread.current.raise as Kernel.raise */
|
||||
if (th == target_th) {
|
||||
RUBY_VM_CHECK_INTS(th);
|
||||
}
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче