[前][次][番号順一覧][スレッド一覧]

ruby-changes:44855

From: nobu <ko1@a...>
Date: Tue, 29 Nov 2016 21:54:49 +0900 (JST)
Subject: [ruby-changes:44855] nobu:r56928 (trunk): thread.c: fix doc of abort_on_exception [ci skip]

nobu	2016-11-29 21:54:43 +0900 (Tue, 29 Nov 2016)

  New Revision: 56928

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=56928

  Log:
    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.

  Modified files:
    trunk/thread.c
Index: thread.c
===================================================================
--- thread.c	(revision 56927)
+++ thread.c	(revision 56928)
@@ -2501,8 +2501,8 @@ rb_thread_s_main(VALUE klass) https://github.com/ruby/ruby/blob/trunk/thread.c#L2501
  *
  *  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) https://github.com/ruby/ruby/blob/trunk/thread.c#L2524
  *  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) https://github.com/ruby/ruby/blob/trunk/thread.c#L2586
  *  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.
  *

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]