Project

General

Profile

Actions

Feature #17407

closed

Fiber.current and require 'fiber'

Added by zverok (Victor Shepelev) over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:101529]

Description

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,

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.

Updated by Eregon (Benoit Daloze) over 1 year ago

Maybe we should just include these Fiber methods in core, and require 'fiber' would be a no-op (for compatibility)?
Agreed it's confusing such a core class has only half the documented methods defined without an extra require.

Actions #2

Updated by nobu (Nobuyoshi Nakada) over 1 year ago

  • Tracker changed from Misc to Feature

Updated by ko1 (Koichi Sasada) over 1 year ago

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.

Actions #5

Updated by nobu (Nobuyoshi Nakada) over 1 year ago

  • Status changed from Open to Closed

Applied in changeset git|521ad9a13aef1e1dae4eaff70d3e6b2e358aa095.


Moved Fiber methods into core [Feature #17407]

Actions

Also available in: Atom PDF