From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id B9C0F1F463 for ; Sun, 5 Jan 2020 22:51:45 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 58C311209C2; Mon, 6 Jan 2020 07:51:32 +0900 (JST) Received: from o1678948x4.outbound-mail.sendgrid.net (o1678948x4.outbound-mail.sendgrid.net [167.89.48.4]) by neon.ruby-lang.org (Postfix) with ESMTPS id CA5EE1209C1 for ; Mon, 6 Jan 2020 07:51:30 +0900 (JST) Received: by filterdrecv-p3las1-5bf99c48d-j57ff with SMTP id filterdrecv-p3las1-5bf99c48d-j57ff-19-5E126879-2E 2020-01-05 22:51:37.84469482 +0000 UTC m=+1721153.627483940 Received: from herokuapp.com (unknown [54.91.247.56]) by ismtpd0060p1mdw1.sendgrid.net (SG) with ESMTP id vukUF28HQS6itCDF1AZvBw for ; Sun, 05 Jan 2020 22:51:37.755 +0000 (UTC) Date: Sun, 05 Jan 2020 22:51:37 +0000 (UTC) From: samuel@oriontransfer.net Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 72336 X-Redmine-Project: ruby-master X-Redmine-Issue-Id: 8215 X-Redmine-Issue-Author: halorgium X-Redmine-Issue-Assignee: nobu X-Redmine-Sender: ioquatix X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-SG-EID: =?us-ascii?Q?cjxb6GWHefMLoR50bkJBcGo6DRiDl=2FNYcMZdY+Wj30Q0I+kMB=2FunSqHYZGYuyy?= =?us-ascii?Q?A0XyVPI49vUZ+IxK=2FjqQ1zYvTiGxktKp0NR0LWf?= =?us-ascii?Q?VsM80x=2FSI00jsKLkmjUX8c6RGEnW4lBHiWNsEmo?= =?us-ascii?Q?teiBJUCPJnBvWxJZ4aaSeLjUUtPEZN9TbEYTac7?= =?us-ascii?Q?zlZUpVyBlJmStVTmzqgwbG55ZFKHNp6JQUAq6Dv?= =?us-ascii?Q?jvIFJBjI56M7OlO4U=3D?= To: ruby-core@ruby-lang.org X-ML-Name: ruby-core X-Mail-Count: 96674 Subject: [ruby-core:96674] [Ruby master Feature#8215] Support accessing Fiber-locals and backtraces for a Fiber X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #8215 has been updated by ioquatix (Samuel Williams). @matz I agree with adding all three APIs, `Fiber#[]`, `Fiber#[]=` and `Fiber#backtrace`. Can you let me know if you are happy with these additions? ---------------------------------------- Feature #8215: Support accessing Fiber-locals and backtraces for a Fiber https://bugs.ruby-lang.org/issues/8215#change-83656 * Author: halorgium (Tim Carey-Smith) * Status: Assigned * Priority: Normal * Assignee: nobu (Nobuyoshi Nakada) * Target version: ---------------------------------------- =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/