From: matz@ruby.or.jp
To: ruby-dev@ruby-lang.org
Subject: [ruby-dev:51082] [Ruby master Feature#17798] exception in finalizer
Date: Thu, 15 Jul 2021 08:30:06 +0000 (UTC) [thread overview]
Message-ID: <redmine.journal-92904.20210715083006.14@ruby-lang.org> (raw)
In-Reply-To: <redmine.issue-17798.20210413133713.14@ruby-lang.org>
Issue #17798 has been updated by matz (Yukihiro Matsumoto).
Sounds OK. Let's try it.
Matz.
----------------------------------------
Feature #17798: exception in finalizer
https://bugs.ruby-lang.org/issues/17798#change-92904
* Author: znz (Kazuhiro NISHIYAMA)
* Status: Open
* Priority: Normal
----------------------------------------
https://docs.ruby-lang.org/ja/latest/method/ObjectSpace/m/define_finalizer.html に
> proc の呼び出しで発生した大域脱出(exitや例外)は無視されます。これは、スクリプトのメイン処理が GC の発生によって非同期に中断されるのを防ぐためです。不安なうちは -d オプションで事前に例外の発生の有無を確認しておいた方が良いでしょう。
とありますが、メインスレッド以外のスレッドが例外で終了したときにデフォルトでは「terminated with exception (report_on_exception is true)」と出るように、デフォルトでは無視せずにメッセージを出すようにしても良いのではないでしょうか?
--
https://bugs.ruby-lang.org/
next prev parent reply other threads:[~2021-07-15 8:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-13 13:37 [ruby-dev:51050] " zn
2021-07-15 8:30 ` matz [this message]
2021-07-22 15:55 ` [ruby-dev:51085] " nobu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=redmine.journal-92904.20210715083006.14@ruby-lang.org \
--to=matz@ruby.or.jp \
--cc=ruby-dev@ruby-lang.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).