ruby-core

Mailing list archive

[ruby-core:66784] [ruby-trunk - Feature #10589] [Open] [TracePoint API] Make THREAD_{BEGIN, END} events return some context information

From: deivid.rodriguez@...
Date: 2014-12-11 16:27:00 UTC
List: ruby-core #66784
Issue #10589 has been reported by David Rodr=C3=ADguez.

----------------------------------------
Feature #10589: [TracePoint API] Make THREAD_{BEGIN, END} events return som=
e context information
https://bugs.ruby-lang.org/issues/10589

* Author: David Rodr=C3=ADguez
* Status: Open
* Priority: Normal
* Assignee:=20
* Category:=20
* Target version:=20
----------------------------------------
Currently the :thread_begin and thread_end events return no context informa=
tion at all

    TracePoint.trace(:thread_begin, :thread_end) do |tp|
      puts "#{tp.defined_class}::#{tp.method_id}@#{tp.path}:#{tp.lineno}"
    end

    t =3D Thread.new do
      sleep 1
    end

    t.join

prints just

    "Hi thread, ::@:0"
    "Bye thread, ::@:0"

It'd be nice if they gave at least some file:line context information about=
 the thread.

What do you think, @ko1? Would this be possible?

Thanks a lot



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

In This Thread

Prev Next