summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-29 12:54:43 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-29 12:54:43 +0000
commit9e3afec027708a3c9919989eeed0d389c8a4c203 (patch)
tree1e3e123552016ea8eca438caf6b57bf761214b77 /thread.c
parent65e27c8b138d6959608658ffce2fa761842b8d24 (diff)
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/trunk@56928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/thread.c b/thread.c
index c596b5bc12..1dbb70d2d7 100644
--- a/thread.c
+++ b/thread.c
@@ -2501,8 +2501,8 @@ rb_thread_s_main(VALUE klass)
*
* The default is +false+.
*
- * When set to +true+, all threads will abort (the process will
- * <code>exit(0)</code>) 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+.
@@ -2524,7 +2524,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
@@ -2585,10 +2586,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 <code>exit(0)</code>.
+ * 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.
*