ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: SASADA Koichi <ko1@atdot.net>
To: Ruby developers <ruby-core@ruby-lang.org>
Subject: [ruby-core:81464] Re: [Ruby trunk Feature#13483] TracePoint#enable with block for thread-local trace
Date: Tue, 30 May 2017 15:41:46 +0900	[thread overview]
Message-ID: <06883a26-9a1a-9b4e-ae85-7d82f9213f90@atdot.net> (raw)
In-Reply-To: <redmine.journal-65128.20170527094915.3c0c79fa095f63b0@ruby-lang.org>

On 2017/05/27 18:49, eregontp@gmail.com wrote:
>> However, this proposal breaks this expectation.
> Could you explain it?
> 
> Is it because trace.enable { code } does not behave like
> begin; trace.enable; code; ensure; trace.disable; end ?

Yes.

> If so, I think this problem could be avoided by just changing the name to imply "thread-local",
> such as trace.enable_for_current_thread { code } or
> trace.enable_in_block { code }.

Yes.

This is what
> I try to consider to introduce how to filter the probes, like:

Considerations about introducing "thread-lcoal" enable:

(1) POSITIVE: because it may be common use case to enable.
(2) NEGATIVE:
  (2-1) because enable_xxx seems verbose.
  (2-2) because we will want to introduce similar method to
        limit file name or method name, like enable_file do ... end
        (this is why I proposed keyword arg)

-- 
// SASADA Koichi at atdot dot net

  reply	other threads:[~2017-05-30  6:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <redmine.issue-13483.20170419073857@ruby-lang.org>
2017-04-19  7:38 ` [ruby-core:80791] [Ruby trunk Feature#13483] TracePoint#enable with block for thread-local trace ko1
2017-05-19  7:31 ` [ruby-core:81260] " ko1
2017-05-26  5:32 ` [ruby-core:81390] " ko1
2017-05-27  9:49 ` [ruby-core:81416] " eregontp
2017-05-30  6:41   ` SASADA Koichi [this message]
2018-12-03 21:33 ` [ruby-core:90271] " samuel

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-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=06883a26-9a1a-9b4e-ae85-7d82f9213f90@atdot.net \
    --to=ruby-core@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 read-only IMAP folder(s) and NNTP newsgroup(s).