From: SASADA Koichi Date: 2017-05-30T15:41:46+09:00 Subject: [ruby-core:81464] Re: [Ruby trunk Feature#13483] TracePoint#enable with block for thread-local trace 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 Unsubscribe: