From 13a55f431ebf1ada341fe8a4eb69fdf5ef0bad39 Mon Sep 17 00:00:00 2001 From: nagachika Date: Tue, 7 Feb 2017 16:45:42 +0000 Subject: merge revision(s) 56928: [Backport #12991] thread.c: fix doc of abort_on_exception [ci skip] * thread.c (rb_thread_s_abort_exc, rb_thread_s_abort_exc_set): [DOC] the raised exception will be re-raised in the main thread, and then follows the ordinary exception sequence, exit status is not 0. [ruby-core:78415] [Bug #12991] * thread.c (rb_thread_abort_exc_set): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@57568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- thread.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'thread.c') diff --git a/thread.c b/thread.c index dade49726f..e48c05e996 100644 --- a/thread.c +++ b/thread.c @@ -2486,8 +2486,8 @@ rb_thread_s_main(VALUE klass) * * The default is +false+. * - * When set to +true+, all threads will abort (the process will - * exit(0)) if an exception is raised in any thread. + * When set to +true+, if any thread is aborted by an exception, the + * raised exception will be re-raised in the main thread. * * Can also be specified by the global $DEBUG flag or command line option * +-d+. @@ -2509,7 +2509,8 @@ rb_thread_s_abort_exc(void) * call-seq: * Thread.abort_on_exception= boolean -> true or false * - * When set to +true+, all threads will abort if an exception is raised. + * When set to +true+, if any thread is aborted by an exception, the + * raised exception will be re-raised in the main thread. * Returns the new state. * * Thread.abort_on_exception = true @@ -2570,10 +2571,8 @@ rb_thread_abort_exc(VALUE thread) * call-seq: * thr.abort_on_exception= boolean -> true or false * - * When set to +true+, all threads (including the main program) will abort if - * an exception is raised in this +thr+. - * - * The process will effectively exit(0). + * When set to +true+, if this +thr+ is aborted by an exception, the + * raised exception will be re-raised in the main thread. * * See also #abort_on_exception. * -- cgit v1.2.3