Project

General

Profile

Actions

Bug #12847

closed

Documentation of instance method Thread.abort_on_exception= is wrong

Bug #12847: Documentation of instance method Thread.abort_on_exception= is wrong

Added by mikekap (Mike Kaplinskiy) about 9 years ago. Updated about 9 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
[ruby-core:77649]

Description

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.

Updated by nobu (Nobuyoshi Nakada) about 9 years ago Actions #1 [ruby-core:77655]

  • Status changed from Open to Rejected

It is the instance-level setting but terminates the whole process.

Updated by mikekap (Mike Kaplinskiy) about 9 years ago Actions #2

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

Actions

Also available in: PDF Atom