Project

General

Profile

Actions

Feature #17407

closed

Fiber.current and require 'fiber'

Added by zverok (Victor Shepelev) about 4 years ago. Updated almost 4 years ago.

Status:
Closed
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) about 4 years 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) almost 4 years ago

  • Tracker changed from Misc to Feature

Updated by ko1 (Koichi Sasada) almost 4 years 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) almost 4 years 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

Like0
Like0Like0Like0Like0Like0