[ruby-core:99520] [Ruby master Feature#8215] Support accessing Fiber-locals and backtraces for a Fiber
From:
samuel@...
Date:
2020-08-08 23:11:26 UTC
List:
ruby-core #99520
Issue #8215 has been updated by ioquatix (Samuel Williams).
Status changed from Assigned to Closed
It looks like we can implement `Fiber#backtrace`:
https://bugs.ruby-lang.org/issues/16815
and in addition we should continue the discussion about Fiber locals:
https://bugs.ruby-lang.org/issues/13893
----------------------------------------
Feature #8215: Support accessing Fiber-locals and backtraces for a Fiber
https://bugs.ruby-lang.org/issues/8215#change-86981
* Author: halorgium (Tim Carey-Smith)
* Status: Closed
* Priority: Normal
* Assignee: ioquatix (Samuel Williams)
----------------------------------------
=begin
As part of debugging celluloid, I have been wanting to diagnose where the Fibers are running and their various locals.
I would expect the following to work.
Thread.current[:key] = "outside"
fiber = Fiber.new do
Thread.current[:key] = "inside"
Fiber.yield
end
fiber.resume
fiber[:key] == "inside" # true
fiber.backtrace # ...
I also wonder whether (({Fiber#[]})) should be implemented, so (({Fiber.current[:key]})) is possible.
For reference, here is the issue on the rubinius issue tracker: ((<"github/rubinius/rubinius/2200"|URL:https://github.com/rubinius/rubinius/issues/2200>))
=end
---Files--------------------------------
0001-cont.c-fiber-local-accessors.patch (2.94 KB)
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>