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-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY 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 C87351F4B4 for ; Wed, 13 Jan 2021 06:52:14 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 338FB120B22; Wed, 13 Jan 2021 15:51:23 +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 50581120AFA for ; Wed, 13 Jan 2021 15:51:21 +0900 (JST) Received: by filterdrecv-p3iad2-577c7fd65d-qh6j9 with SMTP id filterdrecv-p3iad2-577c7fd65d-qh6j9-19-5FFE9893-2D 2021-01-13 06:52:03.468304754 +0000 UTC m=+42809.441118838 Received: from herokuapp.com (unknown) by ismtpd0138p1mdw1.sendgrid.net (SG) with ESMTP id BcMaqQhnTdCdEGaimFWj9A for ; Wed, 13 Jan 2021 06:52:03.343 +0000 (UTC) Date: Wed, 13 Jan 2021 06:52:03 +0000 (UTC) From: ko1@atdot.net Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 77956 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Feature X-Redmine-Issue-Id: 17407 X-Redmine-Issue-Author: zverok X-Redmine-Sender: ko1 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?fVTMYOBjtdvXNcWwrscBhLsHItUXVK5L4mtnq0mdcRcURC=2FO8KpD8MqV1sHJRn?= =?us-ascii?Q?L1Zn9JMdBN=2FHEbIi5qUr0NKUlpkgcWSmpjCZZ0R?= =?us-ascii?Q?oWeSyGH9ThFwx5j80rQJAn1+9K3EbFgWeYl=2FPMS?= =?us-ascii?Q?bb59cyHTZ=2FyDy8zpVHGLPew5lwntI2+KOeIN6kp?= =?us-ascii?Q?i+2yZhKq+ICD2+jTgHIKbETQHmXyqYSzTTg=3D=3D?= To: ruby-core@ruby-lang.org X-Entity-ID: b/2+PoftWZ6GuOu3b0IycA== X-ML-Name: ruby-core X-Mail-Count: 102053 Subject: [ruby-core:102053] [Ruby master Feature#17407] Fiber.current and require '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 #17407 has been updated by ko1 (Koichi Sasada). I still think `Fiber.current` is not needed because `Fiber#transfer` is not easy feature to use. However, Fiber scheduler is introduced and they can be utilize. So I'm okay for nobu's PR. ---------------------------------------- Feature #17407: Fiber.current and require 'fiber' https://bugs.ruby-lang.org/issues/17407#change-89909 * Author: zverok (Victor Shepelev) * Status: Open * Priority: Normal ---------------------------------------- Maybe it is not the right time to ask, but why one need to do `require 'fiber'` before using `Fiber.current`? For what I can see, * it is this way since [their introduction](https://docs.ruby-lang.org/en/2.0.0/Fiber.html#method-c-current), * the actual code is defined in the core [cont.c](https://github.com/ruby/ruby/blob/master/cont.c#L2480) * the `ext/fiber.c` [does very little](https://github.com/ruby/ruby/blob/master/ext/fiber/fiber.c) I was just bitten by it again preparing the changelog (stuck with `NoMethodError` and for a few minutes thought the build is broken), is there a reason to have it this way?.. Just clarifying for docs sake, at least. -- https://bugs.ruby-lang.org/