[ruby-core:77658] [Ruby trunk Bug#12847] Documentation of instance method Thread.abort_on_exception= is wrong

From: mike.kaplinskiy@...
Date: 2016-10-18 05:44:55 UTC
List: ruby-core #77658
Issue #12847 has been updated by Mike Kaplinskiy.


Hah sorry about that, I completely misread the sentence. I would suggest changing the docs to be a bit more clear that this is different than `Thread.abort_on_exception=` (though it is logical). Maybe something like:

~~~
When set to true, the process (including all threads and the main thread) will abort if an uncaught exception is raised in this thr.
~~~

Unfortunately, I'm not the only one that didn't quite understand the docs: https://github.com/reevoo/fluent-plugin-systemd/pull/15

----------------------------------------
Bug #12847: Documentation of instance method Thread.abort_on_exception= is wrong
https://bugs.ruby-lang.org/issues/12847#change-60930

* Author: Mike Kaplinskiy
* Status: Rejected
* Priority: Normal
* Assignee: 
* ruby -v: 
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
The documentation for the instance method says that the setting is global: https://ruby-doc.org/core-2.3.0/Thread.html#method-i-abort_on_exception-3D:

~~~
When set to true, all threads (including the main program) will abort if an exception is raised in this thr.
~~~

That's actually incorrect - the instance-level setting affects only the thread it was set on; it's not global.



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next