Feature #8291

Allow retrieving the root Fiber of a Thread

Added by Tim Carey-Smith about 1 year ago. Updated 12 months ago.

[ruby-core:54459]
Status:Open
Priority:Normal
Assignee:-
Category:-
Target version:-

Description

=begin
Currently (({Thread.backtrace})) returns the stack frames for the currently running (({Fiber})).
It is not possible to retrieve the backtrace.

Building on http://bugs.ruby-lang.org/issues/8263, this would allow for this feature.
=end

History

#1 Updated by Koichi Sasada 12 months ago

(2013/04/19 15:53), halorgium (Tim Carey-Smith) wrote:

Currently (({Thread.backtrace})) returns the stack frames for the currently running (({Fiber})).
It is not possible to retrieve the backtrace.

Building on http://bugs.ruby-lang.org/issues/8263, this would allow for this feature.

Sorry, I can't understand your proposal. Different discussion from #8263 ?

BTW, there are no Thread.backtrace method.

Thread.backtrace
#=>
ruby 2.1.0dev (2013-03-18 trunk 39808) [i386-mswin32_100]
t.rb:1:in <main>': undefined methodbacktrace' for Thread:Class
(NoMethodError)

--
// SASADA Koichi at atdot dot net

#2 Updated by Nobuyoshi Nakada 12 months ago

(13/04/28 7:40), SASADA Koichi wrote:

BTW, there are no Thread.backtrace method.

Thread.backtrace
#=>
ruby 2.1.0dev (2013-03-18 trunk 39808) [i386-mswin32_100]
t.rb:1:in <main>': undefined methodbacktrace' for Thread:Class
(NoMethodError)

It would be Thread#backtrace, I guess.

--
Nobu Nakada

#3 Updated by Tim Carey-Smith 12 months ago

I am proposing adding the ability to call Thread#root_fiber to return the Fiber which is considered the original co-routine for the specified Thread.
This is useful to be able to retrieve information about the original Fiber for the Thread.

#4 Updated by Koichi Sasada 12 months ago

(2013/04/28 19:35), halorgium (Tim Carey-Smith) wrote:

I am proposing adding the ability to call Thread#root_fiber to return the Fiber which is considered the original co-routine for the specified Thread.
This is useful to be able to retrieve information about the original Fiber for the Thread.

I understand what you want. How to use it?

--
// SASADA Koichi at atdot dot net

Also available in: Atom PDF