Project

General

Profile

Actions

Feature #10589

open

[TracePoint API] Make THREAD_{BEGIN, END} events return some context information

Added by deivid (David Rodríguez) over 9 years ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:66784]

Description

Currently the :thread_begin and thread_end events return no context information at all

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

t = 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 (Koichi Sasada)? Would this be possible?

Thanks a lot

No data to display

Actions

Also available in: Atom PDF

Like0